home *** CD-ROM | disk | FTP | other *** search
Text File | 2006-12-28 | 536.7 KB | 15,982 lines |
- ## $Id$
- ##
- ## Copyright (C) 2002 Damon Courtney
- ##
- ## This program is free software; you can redistribute it and/or
- ## modify it under the terms of the GNU General Public License
- ## as published by the Free Software Foundation; either version 2
- ## of the License, or (at your option) any later version.
- ##
- ## This program is distributed in the hope that it will be useful,
- ## but WITHOUT ANY WARRANTY; without even the implied warranty of
- ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ## GNU General Public License for more details.
- ##
- ## You should have received a copy of the GNU General Public License
- ## along with this program; if not, write to the
- ## Free Software Foundation, Inc.
- ## 51 Franklin Street, Fifth Floor
- ## Boston, MA 02110-1301, USA.
- ##
-
- if {[info exists ::InstallJammer]} { return }
-
- catch { wm withdraw . }
-
- namespace eval ::InstallJammer {}
-
- trace add variable ::info write ::InstallJammer::AdjustBooleanVars
-
- proc ::InstallJammer::AdjustBooleanVars { name1 name2 op } {
- ## If a user is typing into an entry that has a -textvariable
- ## in the info array, we don't want to adjust what the user is typing.
- if {![catch { lindex [info level -1] 0 } cmd]} {
- if {$cmd eq "tk::EntryInsert" || $cmd eq "tile::entry::Insert"} {
- return
- }
- }
-
- if {[string length $name2]} {
- upvar #0 ${name1}($name2) var
- } else {
- upvar #0 $name1 var
- }
-
- if {[info exists var]} {
- if {[string is true -strict $var]} {
- set var 1
- } elseif {[string is false -strict $var]} {
- set var 0
- }
- }
- }
-
- namespace eval ::InstallJammer {}
- namespace eval ::InstallAPI {}
- set conf(version) 1.0.4
- set info(Platform) Windows
- set info(InstallerID) A7CE50BB-3922-4F13-9F73-D0CABA617F3E
- array set ::InstallJammer::languagecodes {de "German"
- en "English"
- es "Spanish"
- fr "French"
- it "Italian"
- pt_br "Brazilian Portugese"
- }
- array set info {
- AllowLanguageSelection
- No
-
- AppName
- CompleteCalc
-
- ApplicationID
- 5923DED3-7B26-46DF-BDA9-724CB75A4A1E
-
- ApplicationURL
- {}
-
- BuildType
- {}
-
- BuildVersion
- 0
-
- CancelledInstallAction
- {Rollback and Stop}
-
- CleanupCancelledInstall
- Yes
-
- Company
- {Check n Do}
-
- CreateDesktopShortcut
- Yes
-
- CreateQuickLaunchShortcut
- Yes
-
- DefaultLanguage
- English
-
- IncludeDebugging
- Yes
-
- InstallDir
- <%PROGRAM_FILES%>/<%AppName%>
-
- InstallType
- Typical
-
- InstallVersion
- 1.2.1.0
-
- LaunchApplication
- Yes
-
- MajorVersion
- 1
-
- MinorVersion
- 2
-
- PatchVersion
- 1
-
- ProgramExecutable
- <%InstallDir%>/CompleteCalc.exe
-
- ProgramFolderAllUsers
- No
-
- ProgramFolderName
- <%AppName%>
-
- ProgramLicense
- <%InstallDir%>/LICENSE.txt
-
- ProgramName
- {}
-
- ProgramReadme
- <%InstallDir%>/README.txt
-
- ShortAppName
- CompleteCalc
-
- Version
- 1.2.1
-
- ViewReadme
- Yes
-
- }
- set info(WindowsSpecialDirs) {ALTSTARTUP APPDATA BITBUCKET COMMON_ALTSTARTUP COMMON_DESKTOPDIRECTORY COMMON_FAVORITES COMMON_PROGRAMS COMMON_STARTMENU COMMON_STARTUP CONTROLS COOKIES DESKTOP DESKTOPDIRECTORY DRIVES FAVORITES FONTS HISTORY INTERNET INTERNET_CACHE NETHOOD NETWORK PERSONAL PRINTERS PRINTHOOD PROGRAMS PROGRAM_FILES QUICK_LAUNCH RECENT SENDTO STARTMENU STARTUP SYSTEM SYSTEM32 TEMPLATES WINDOWS}
- array set ::InstallJammer::Properties {
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,Active
- Yes
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,Alias
- {}
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,CheckCondition
- {Before Pane is Displayed}
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,Comment
- {}
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,Component
- {}
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,FailureMessage
- {}
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,ID
- {}
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,Operator
- false
-
- 00751641-DBBA-47C1-A7B9-0975B0C2644F,String
- <%InstallStopped%>
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,Active
- Yes
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,Alias
- {}
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,CheckCondition
- {Before Pane is Displayed}
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,Comment
- {}
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,Component
- {}
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,FailureMessage
- {}
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,ID
- {}
-
- 0509031B-2E3F-4330-B44F-1E1586B0B38F,Script
- {[<%CurrentPane%> get UserMustAcceptLicense]}
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,Active
- Yes
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,Alias
- {}
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,CheckCondition
- {Before Pane is Displayed}
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,Comment
- {}
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,Component
- {}
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,FailureMessage
- {}
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,ID
- {}
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,Operator
- false
-
- 0ACE12C8-A333-46A4-B24F-7C895219F2B0,String
- <%InstallStopped%>
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,Active
- Yes
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,Alias
- {}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,CommandLineArguments
- {}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,Comment
- {}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,Component
- {}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,Conditions
- {}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,ExecuteAction
- {After Pane is Displayed}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,ID
- {}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,IconPath
- {}
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,IconPathIndex
- 0
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,IgnoreErrors
- No
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,ShortcutDirectory
- <%QUICK_LAUNCH%>
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,ShortcutName
- <%AppName%>
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,TargetFileName
- <%ProgramExecutable%>
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,WindowState
- normal
-
- 1A5BA78D-0B6B-4051-B460-B94426C061F7,WorkingDirectory
- <%InstallDir%>
-
- 1AF0EAD8-E770-4022-849F-D4C625BE1284,Active
- Yes
-
- 1AF0EAD8-E770-4022-849F-D4C625BE1284,Alias
- {Cancel Actions}
-
- 1AF0EAD8-E770-4022-849F-D4C625BE1284,Comment
- {}
-
- 1AF0EAD8-E770-4022-849F-D4C625BE1284,Conditions
- {}
-
- 1AF0EAD8-E770-4022-849F-D4C625BE1284,ID
- {}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,Action
- {Install Actions}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,Active
- Yes
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,Alias
- {}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,Comment
- {}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,Component
- {}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,Conditions
- {}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,EvaluateConditions
- Yes
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,ExecuteAction
- {After Pane is Displayed}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,ID
- {}
-
- 1D8EB93F-5852-46CE-B93A-A4ED5672E32F,IgnoreErrors
- No
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,Active
- Yes
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,Alias
- {}
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,CheckCondition
- {Before Pane is Displayed}
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,Comment
- {}
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,Component
- {}
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,FailureMessage
- {}
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,Filename
- <%ProgramExecutable%>
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,ID
- {}
-
- 211BD58E-6D44-49A5-AC4F-2DFA63C61083,Operator
- exists
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,Action
- {Install Actions}
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,Active
- Yes
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,Alias
- {}
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,Comment
- {}
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,Component
- {}
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,Conditions
- {}
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,EvaluateConditions
- Yes
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,ExecuteAction
- {After Pane is Displayed}
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,ID
- {}
-
- 242E27AA-551C-4796-B099-DFCAF9498E62,IgnoreErrors
- No
-
- 25542048-E343-4AD5-B1A3-90B504E68373,Active
- Yes
-
- 25542048-E343-4AD5-B1A3-90B504E68373,Alias
- {}
-
- 25542048-E343-4AD5-B1A3-90B504E68373,CheckCondition
- {Before Pane is Displayed}
-
- 25542048-E343-4AD5-B1A3-90B504E68373,Comment
- {}
-
- 25542048-E343-4AD5-B1A3-90B504E68373,Component
- {}
-
- 25542048-E343-4AD5-B1A3-90B504E68373,FailureMessage
- {}
-
- 25542048-E343-4AD5-B1A3-90B504E68373,Filename
- <%ProgramExecutable%>
-
- 25542048-E343-4AD5-B1A3-90B504E68373,ID
- {}
-
- 25542048-E343-4AD5-B1A3-90B504E68373,Operator
- exists
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,Active
- Yes
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,Alias
- {}
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,Comment
- {}
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,Description,subst
- 1
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,FileGroups
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,ID
- {}
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,Name
- {Default Component}
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,RequiredComponent
- Yes
-
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9,ShowComponent
- Yes
-
- 26169907-3309-4C13-80BA-E6392EFA3702,AcceptRadiobutton,subst
- 0
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Active
- Yes
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Alias
- {}
-
- 26169907-3309-4C13-80BA-E6392EFA3702,BackButton,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Buttons
- Back/Next/Cancel
-
- 26169907-3309-4C13-80BA-E6392EFA3702,CancelButton,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Caption,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Comment
- {}
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Component
- {}
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Conditions
- {0 conditions}
-
- 26169907-3309-4C13-80BA-E6392EFA3702,DeclineRadiobutton,subst
- 0
-
- 26169907-3309-4C13-80BA-E6392EFA3702,ID
- {}
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Icon
- <%Icon%>
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Message,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,NextButton,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Subtitle,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Text,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,Title,subst
- 1
-
- 26169907-3309-4C13-80BA-E6392EFA3702,UserMustAcceptLicense
- Yes
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,Active
- Yes
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,Alias
- {}
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,CheckCondition
- {Before Pane is Displayed}
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,Comment
- {}
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,Component
- {}
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,FailureMessage
- {}
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,ID
- {}
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,Operator
- true
-
- 29E269AB-C3E3-4698-A8C4-0498DD1B541A,String
- <%ViewReadme%>
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,Active
- Yes
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,Alias
- {}
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,CheckCondition
- {Before Pane is Displayed}
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,Comment
- {}
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,Component
- {}
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,FailureMessage
- {}
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,ID
- {}
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,Operator
- false
-
- 2F135310-2F98-4A7C-9DC1-ED574350AA47,String
- <%LicenseAccepted%>
-
- 354BBA54-2679-44CC-B528-BB123868926D,Active
- Yes
-
- 354BBA54-2679-44CC-B528-BB123868926D,Alias
- {}
-
- 354BBA54-2679-44CC-B528-BB123868926D,BackButton,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,Buttons
- Back/Next/Cancel
-
- 354BBA54-2679-44CC-B528-BB123868926D,CancelButton,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,Caption,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,Comment
- {}
-
- 354BBA54-2679-44CC-B528-BB123868926D,Component
- {}
-
- 354BBA54-2679-44CC-B528-BB123868926D,Conditions
- {0 conditions}
-
- 354BBA54-2679-44CC-B528-BB123868926D,FileLabel,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,ID
- {}
-
- 354BBA54-2679-44CC-B528-BB123868926D,Icon
- <%Icon%>
-
- 354BBA54-2679-44CC-B528-BB123868926D,Message,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,NextButton,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,ProgressValue,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,Subtitle,subst
- 1
-
- 354BBA54-2679-44CC-B528-BB123868926D,Title,subst
- 1
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,Active
- Yes
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,Alias
- {}
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,CheckCondition
- {Before Next Pane is Displayed}
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,Comment
- {}
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,Component
- {}
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,FailureMessage
- <%DirectoryPermissionText%>
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,Filename
- <%InstallDir%>
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,ID
- {}
-
- 376A656F-918F-49E1-9E01-3E734532FA0F,Permission
- {can create}
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,Active
- Yes
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,Alias
- {}
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,CheckCondition
- {Before Pane is Displayed}
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,Comment
- {}
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,Component
- {}
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,FailureMessage
- {}
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,ID
- {}
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,Operator
- is
-
- 3801681B-4E3B-4AA7-8787-A96E18DD14B6,Platform
- Windows
-
- 41678FFA-A713-40E4-8E81-E374344D2971,Active
- Yes
-
- 41678FFA-A713-40E4-8E81-E374344D2971,Alias
- {Startup Actions}
-
- 41678FFA-A713-40E4-8E81-E374344D2971,Comment
- {}
-
- 41678FFA-A713-40E4-8E81-E374344D2971,Conditions
- {}
-
- 41678FFA-A713-40E4-8E81-E374344D2971,ID
- {}
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,Active
- Yes
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,Alias
- {}
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,CheckCondition
- {Before Pane is Displayed}
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,Comment
- {}
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,Component
- {}
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,FailureMessage
- {}
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,ID
- {}
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,Operator
- is
-
- 426B6A63-5AB7-42BB-B78F-3236D745399B,Platform
- Windows
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,Active
- Yes
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,Alias
- {}
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,CheckCondition
- {Before Pane is Displayed}
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,Comment
- {}
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,Component
- {}
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,FailureMessage
- {}
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,Filename
- <%ProgramExecutable%>
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,ID
- {}
-
- 4439AB66-CCD9-4421-BDB3-851F51B2DEE7,Operator
- exists
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Active
- Yes
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Alias
- {}
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,BackButton,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Buttons
- Back/Next/Cancel
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,CancelButton,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Caption,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Comment
- {}
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Component
- {}
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Conditions
- {}
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,FileLabel,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,ID
- {}
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Icon
- <%Icon%>
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Message,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,NextButton,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,ProgressValue,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Subtitle,subst
- 1
-
- 44F378EE-B695-45D5-96FE-1BBC93596B1F,Title,subst
- 1
-
- 4A354C44-1D80-4EFC-991B-1550F2A9E791,Active
- Yes
-
- 4A354C44-1D80-4EFC-991B-1550F2A9E791,Alias
- {}
-
- 4A354C44-1D80-4EFC-991B-1550F2A9E791,Comment
- {}
-
- 4A354C44-1D80-4EFC-991B-1550F2A9E791,Components
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9
-
- 4A354C44-1D80-4EFC-991B-1550F2A9E791,Description,subst
- 1
-
- 4A354C44-1D80-4EFC-991B-1550F2A9E791,ID
- {}
-
- 4A354C44-1D80-4EFC-991B-1550F2A9E791,Name
- Custom
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Active
- Yes
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Alias
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Comment
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Comments
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Component
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Conditions
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Contact
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,DisplayIcon
- <%ProgramExecutable%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,DisplayName
- <%AppName%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,DisplayVersion
- <%Version%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,ExecuteAction
- {After Pane is Displayed}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,HelpLink
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,HelpTelephone
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,ID
- {}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,IgnoreErrors
- No
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,InstallDate
- {<%Date %Y%m%d%>}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,InstallLocation
- <%InstallDir%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,InstallSource
- <%InstallSource%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Publisher
- <%Company%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,QuietUninstallString
- {<%Uninstaller%> -S}
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,Readme
- <%ProgramReadme%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,RegistryKeyName
- <%ApplicationID%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,URLInfoAbout
- <%ApplicationURL%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,URLUpdateInfo
- <%ApplicationURL%>
-
- 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70,UninstallString
- <%Uninstaller%>
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Active
- Yes
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Alias
- {}
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,BackButton,subst
- 1
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Buttons
- Next/Cancel
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,CancelButton,subst
- 1
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Caption,subst
- 1
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Comment
- {}
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Component
- {}
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Conditions
- {0 conditions}
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,ID
- {}
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Image
- <%Image%>
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,Message,subst
- 1
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,NextButton,subst
- 1
-
- 4C3FF654-9F5C-4679-B71D-F23E14F61844,WizardOptions
- {-bg white -separator 0}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,Active
- Yes
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,Alias
- {}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,Comment
- {}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,Component
- {}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,Conditions
- {}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,ExecuteAction
- {After Pane is Displayed}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,ID
- {}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,IgnoreErrors
- No
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,State
- disabled
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,Text
- {}
-
- 4C97A1FF-3B60-4E13-9D4E-020C32F5A661,Widget
- {Back Button;Next Button}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,Active
- Yes
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,Alias
- {}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,CommandLineArguments
- {}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,Comment
- {}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,Component
- {}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,Conditions
- {}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,ExecuteAction
- {After Pane is Displayed}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,ID
- {}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,IconPath
- {}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,IconPathIndex
- 0
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,IgnoreErrors
- No
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,ShortcutDirectory
- <%ProgramFolder%>
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,ShortcutName
- {Uninstall <%AppName%>}
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,TargetFileName
- <%Uninstaller%>
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,WindowState
- normal
-
- 4D90F974-8C14-4E2F-B458-82FE9510F546,WorkingDirectory
- <%InstallDir%>
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Active
- Yes
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Alias
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Background
- white
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Checked
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Comment
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Component
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Conditions
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,ExecuteAction
- {After Pane is Displayed}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Height
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,ID
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,IgnoreErrors
- No
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Text,subst
- 1
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Type
- checkbutton
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Value
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,VirtualText
- LaunchApplication
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Width
- {}
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,X
- 185
-
- 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4,Y
- 160
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,Active
- Yes
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,Alias
- {}
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,CheckCondition
- {Before Pane is Displayed}
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,Comment
- {}
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,Component
- {}
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,FailureMessage
- {}
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,Filename
- <%ProgramExecutable%>
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,ID
- {}
-
- 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7,Operator
- exists
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,Active
- Yes
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,Alias
- {}
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,Comment
- {}
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,Component
- {}
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,Conditions
- {}
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,ExecuteAction
- {After Pane is Displayed}
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,ID
- {}
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,IgnoreErrors
- No
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,Message
- <%BuildUninstallText%>
-
- 4F8BE818-346C-4637-AE4C-4A6B7C48CB74,UninstallDirectory
- <%InstallDir%>
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,Active
- Yes
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,Alias
- {}
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,CheckCondition
- {Before Pane is Displayed}
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,Comment
- {}
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,Component
- {}
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,FailureMessage
- {}
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,Filename
- <%ProgramExecutable%>
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,ID
- {}
-
- 50748934-8AC2-4A3C-AC85-D701FAC60C49,Operator
- exists
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,Active
- Yes
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,Alias
- {}
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,Comment
- {}
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,Component
- {}
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,Conditions
- {}
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,ExecuteAction
- {After Pane is Displayed}
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,ID
- {}
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,IgnoreErrors
- No
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,State
- disabled
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,Text
- {}
-
- 5315266E-E68B-435E-AFBC-E218FDC19369,Widget
- {Back Button;Next Button}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Active
- Yes
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Alias
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Background
- white
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Checked
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Comment
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Component
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Conditions
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,ExecuteAction
- {After Pane is Displayed}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Height
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,ID
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,IgnoreErrors
- No
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Text,subst
- 1
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Type
- checkbutton
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Value
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,VirtualText
- LaunchApplication
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Width
- {}
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,X
- 185
-
- 55DB7606-259D-4B3C-A3C1-5CCF6C12638C,Y
- 160
-
- 5DD477BC-16FE-4DDC-9161-E30D7E1DB549,Active
- Yes
-
- 5DD477BC-16FE-4DDC-9161-E30D7E1DB549,Alias
- {Finish Actions}
-
- 5DD477BC-16FE-4DDC-9161-E30D7E1DB549,Comment
- {}
-
- 5DD477BC-16FE-4DDC-9161-E30D7E1DB549,Conditions
- {}
-
- 5DD477BC-16FE-4DDC-9161-E30D7E1DB549,ID
- {}
-
- 5F9F234B-8C55-46E5-B883-78843926A386,Active
- Yes
-
- 5F9F234B-8C55-46E5-B883-78843926A386,Alias
- {}
-
- 5F9F234B-8C55-46E5-B883-78843926A386,CheckCondition
- {Before Pane is Displayed}
-
- 5F9F234B-8C55-46E5-B883-78843926A386,Comment
- {}
-
- 5F9F234B-8C55-46E5-B883-78843926A386,Component
- {}
-
- 5F9F234B-8C55-46E5-B883-78843926A386,FailureMessage
- {}
-
- 5F9F234B-8C55-46E5-B883-78843926A386,ID
- {}
-
- 5F9F234B-8C55-46E5-B883-78843926A386,Operator
- false
-
- 5F9F234B-8C55-46E5-B883-78843926A386,String
- <%InstallStopped%>
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,Active
- Yes
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,Alias
- {}
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,CheckCondition
- {Before Pane is Displayed}
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,Comment
- {}
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,Component
- {}
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,FailureMessage
- {}
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,Filename
- <%ProgramExecutable%>
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,ID
- {}
-
- 625FF735-46E7-411C-ABFE-D0BE7677001B,Operator
- exists
-
- 62EF759C-DEDA-4D58-AED0-90D0974F1657,Active
- Yes
-
- 62EF759C-DEDA-4D58-AED0-90D0974F1657,Alias
- {Install Actions}
-
- 62EF759C-DEDA-4D58-AED0-90D0974F1657,Comment
- {}
-
- 62EF759C-DEDA-4D58-AED0-90D0974F1657,Conditions
- {}
-
- 62EF759C-DEDA-4D58-AED0-90D0974F1657,ID
- {}
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,Active
- Yes
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,Alias
- {}
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,CheckCondition
- {Before Pane is Displayed}
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,Comment
- {}
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,Component
- {}
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,FailureMessage
- {}
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,ID
- {}
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,Operator
- false
-
- 642021C6-FD45-486A-91AB-8A333627A3D9,String
- <%InstallStopped%>
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,Active
- Yes
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,Alias
- {}
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,CheckCondition
- {Before Pane is Displayed}
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,Comment
- {}
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,Component
- {}
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,FailureMessage
- {}
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,ID
- {}
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,Operator
- false
-
- 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F,String
- <%InstallStopped%>
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Active
- Yes
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Alias
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Background
- white
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Checked
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Comment
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Component
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Conditions
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,ExecuteAction
- {After Pane is Displayed}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Height
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,ID
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,IgnoreErrors
- No
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Text,subst
- 1
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Type
- checkbutton
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Value
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,VirtualText
- ViewReadme
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Width
- {}
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,X
- 185
-
- 6A4B5CE4-BBF6-4444-8593-E188A69FA768,Y
- 140
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,Active
- Yes
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,Alias
- {}
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,CheckCondition
- {Before Pane is Displayed}
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,Comment
- {}
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,Component
- {}
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,FailureMessage
- {}
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,ID
- {}
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,Operator
- false
-
- 71ED690B-1531-4FC1-A869-F347967DE87B,String
- <%InstallStopped%>
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,Active
- Yes
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,AdditionalArguments
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,Alias
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,CommandLineArguments
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,Comment
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,Component
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,Conditions
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,ExecuteAction
- {After Pane is Displayed}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,ID
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,IconPath
- {}
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,IconPathIndex
- 0
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,IgnoreErrors
- No
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,InstallForAllUsers
- No
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,ShortcutName
- <%AppName%>
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,ShortcutType
- Application
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,TargetFileName
- <%ProgramExecutable%>
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,WindowState
- normal
-
- 75C4743C-92B4-41B2-9162-2929B3A08869,WorkingDirectory
- <%InstallDir%>
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,Active
- Yes
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,Alias
- {}
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,CheckCondition
- {Before Pane is Displayed}
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,Comment
- {}
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,Component
- {}
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,FailureMessage
- {}
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,Filename
- <%ProgramExecutable%>
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,ID
- {}
-
- 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20,Operator
- exists
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Active
- Yes
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Alias
- {}
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Anchor
- center
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Caption,subst
- 1
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,CloseButton,subst
- 1
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Comment
- {}
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Component
- {}
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Conditions
- {}
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,ExecuteAction
- {After Pane is Displayed}
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,GrabFocus
- Yes
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Height
- 300
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,ID
- {}
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,IgnoreErrors
- No
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Message,subst
- 1
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,TextFile
- <%ProgramReadme%>
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,TextWrap
- word
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Title,subst
- 1
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,WaitOnWindow
- Yes
-
- 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8,Width
- 400
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,Active
- Yes
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,Alias
- {}
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,CheckCondition
- {Before Pane is Displayed}
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,Comment
- {}
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,Component
- {}
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,FailureMessage
- {}
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,Filename
- <%ProgramExecutable%>
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,ID
- {}
-
- 78C0D25B-104F-4227-ADF5-C342079844AD,Operator
- exists
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Active
- Yes
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Alias
- {}
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,BackButton,subst
- 1
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Buttons
- Back/Next/Cancel
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,CancelButton,subst
- 1
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Caption,subst
- 1
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Comment
- {}
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Component
- {}
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Conditions
- {0 conditions}
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,ID
- {}
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Icon
- <%Icon%>
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Message,subst
- 1
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,NextButton,subst
- 1
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Subtitle,subst
- 1
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Text,subst
- 1
-
- 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Title,subst
- 1
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,Active
- Yes
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,Alias
- {}
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,CheckCondition
- {Before Pane is Displayed}
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,Comment
- {}
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,Component
- {}
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,FailureMessage
- {}
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,Filename
- <%ProgramExecutable%>
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,ID
- {}
-
- 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F,Operator
- exists
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Active
- Yes
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Alias
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Background
- white
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Checked
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Comment
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Component
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Conditions
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,ExecuteAction
- {After Pane is Displayed}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Height
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,ID
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,IgnoreErrors
- No
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Text,subst
- 1
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Type
- checkbutton
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Value
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,VirtualText
- CreateDesktopShortcut
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Width
- {}
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,X
- 185
-
- 85CBEC09-95F0-4510-8130-23292CD4E280,Y
- 180
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,Active
- Yes
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,Alias
- {}
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,CheckCondition
- {Before Pane is Displayed}
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,Comment
- {}
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,Component
- {}
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,FailureMessage
- {}
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,ID
- {}
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,Operator
- true
-
- 8E64750C-6A5E-4955-9FA0-396CC703201B,String
- <%LaunchApplication%>
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,Active
- Yes
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,Alias
- {}
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,CheckCondition
- {Before Pane is Displayed}
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,Comment
- {}
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,Component
- {}
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,FailureMessage
- {}
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,ID
- {}
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,Operator
- is
-
- 9B3864C7-F41B-43F6-B5FB-86D60573F3EA,Platform
- Windows
-
- 9D77E823-EBFA-474A-9016-D327212A026B,Active
- Yes
-
- 9D77E823-EBFA-474A-9016-D327212A026B,Alias
- {}
-
- 9D77E823-EBFA-474A-9016-D327212A026B,CheckCondition
- {Before Pane is Displayed}
-
- 9D77E823-EBFA-474A-9016-D327212A026B,Comment
- {}
-
- 9D77E823-EBFA-474A-9016-D327212A026B,Component
- {}
-
- 9D77E823-EBFA-474A-9016-D327212A026B,FailureMessage
- {}
-
- 9D77E823-EBFA-474A-9016-D327212A026B,ID
- {}
-
- 9D77E823-EBFA-474A-9016-D327212A026B,Operator
- false
-
- 9D77E823-EBFA-474A-9016-D327212A026B,String
- <%SilentMode%>
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Active
- Yes
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Alias
- {}
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,BackButton,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,BrowseButton,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,BrowseText,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Buttons
- Back/Next/Cancel
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,CancelButton,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Caption,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Comment
- {}
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Component
- {}
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Conditions
- {1 condition}
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,DestinationLabel,subst
- 0
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,ID
- {}
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Icon
- <%Icon%>
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Message,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,NextButton,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Subtitle,subst
- 1
-
- 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Title,subst
- 1
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Active
- Yes
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Alias
- {}
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,BackButton,subst
- 1
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Buttons
- Next/Cancel
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,CancelButton,subst
- 1
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Caption,subst
- 1
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Comment
- {}
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Component
- {}
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Conditions
- {0 conditions}
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,ID
- {}
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Image
- <%Image%>
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,Message,subst
- 1
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,NextButton,subst
- 1
-
- A2E136B8-114D-4028-876B-5F7DE6E5D06C,WizardOptions
- {-bg white -separator 0}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Active
- Yes
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Alias
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Background
- white
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Checked
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Comment
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Component
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Conditions
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,ExecuteAction
- {After Pane is Displayed}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Height
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,ID
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,IgnoreErrors
- No
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Text,subst
- 1
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Type
- checkbutton
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Value
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,VirtualText
- ViewReadme
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Width
- {}
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,X
- 185
-
- A41FE23D-88CA-44B9-B9A7-18C2F2879E8D,Y
- 140
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Active
- Yes
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Alias
- {}
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,BackButton,subst
- 1
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Buttons
- Next/Cancel
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,CancelButton,subst
- 1
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Caption,subst
- 1
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Comment
- {}
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Component
- {}
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Conditions
- {}
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,ID
- {}
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Image
- <%Image%>
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Message,subst
- 1
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,NextButton,subst
- 1
-
- A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,WizardOptions
- {-bg white -separator 0}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,Active
- Yes
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,Alias
- {}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,Comment
- {}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,Component
- {}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,Conditions
- {}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,ExecuteAction
- {After Pane is Displayed}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,ID
- {}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,IgnoreErrors
- No
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,ProgramCommandLine
- <%ProgramExecutable%>
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,ProgressiveOutputWidget
- {}
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,ResultVirtualText
- ExternalProgramResult
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,ShowProgressiveOutput
- No
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,StatusVirtualText
- ExternalProgramStatus
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,WaitForProgram
- No
-
- A5A6DE1F-6058-4D53-ACB1-C0E411A485AE,WorkingDirectory
- <%InstallDir%>
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,Active
- Yes
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,Alias
- {}
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,Comment
- {}
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,Component
- {}
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,Conditions
- {}
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,ExecuteAction
- {After Pane is Displayed}
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,ID
- {}
-
- A6185DCF-A645-44CE-BCA8-AD0CF2DD3183,IgnoreErrors
- No
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,Active
- Yes
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,Alias
- {}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,CommandLineArguments
- {}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,Comment
- {}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,Component
- {}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,Conditions
- {}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,ExecuteAction
- {After Pane is Displayed}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,ID
- {}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,IconPath
- {}
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,IconPathIndex
- 0
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,IgnoreErrors
- No
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,ShortcutDirectory
- <%ProgramFolder%>
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,ShortcutName
- <%AppName%>
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,TargetFileName
- <%ProgramExecutable%>
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,WindowState
- normal
-
- A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3,WorkingDirectory
- <%InstallDir%>
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,Active
- Yes
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,Alias
- {}
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,CheckCondition
- {Before Pane is Displayed}
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,Comment
- {}
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,Component
- {}
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,FailureMessage
- {}
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,Filename
- <%ProgramReadme%>
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,ID
- {}
-
- AB94C219-6C76-4908-9CCE-99A4E7AB484F,Operator
- exists
-
- B8C49671-1167-476C-90AF-509528EAC2EE,Active
- Yes
-
- B8C49671-1167-476C-90AF-509528EAC2EE,Alias
- {}
-
- B8C49671-1167-476C-90AF-509528EAC2EE,CheckCondition
- {Before Pane is Displayed}
-
- B8C49671-1167-476C-90AF-509528EAC2EE,Comment
- {}
-
- B8C49671-1167-476C-90AF-509528EAC2EE,Component
- {}
-
- B8C49671-1167-476C-90AF-509528EAC2EE,FailureMessage
- {}
-
- B8C49671-1167-476C-90AF-509528EAC2EE,ID
- {}
-
- B8C49671-1167-476C-90AF-509528EAC2EE,Operator
- true
-
- B8C49671-1167-476C-90AF-509528EAC2EE,String
- <%CreateQuickLaunchShortcut%>
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,Active
- Yes
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,Alias
- {}
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,CheckCondition
- {Before Pane is Displayed}
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,Comment
- {}
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,Component
- {}
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,FailureMessage
- {}
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,ID
- {}
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,Operator
- true
-
- B8D63777-F7F8-4C24-901D-8024A7AB2F06,String
- <%CreateDesktopShortcut%>
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,Active
- Yes
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,Alias
- {}
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,Comment
- {}
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,Component
- {}
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,Conditions
- {}
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,ExecuteAction
- {After Pane is Displayed}
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,ID
- {}
-
- BA400D3F-D7F5-4B08-96DC-091A0416E08E,IgnoreErrors
- No
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Active
- Yes
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Alias
- {}
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Attributes
- {}
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Comment
- {}
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Destination
- <%InstallDir%>
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,FileUpdateMethod
- {Update files with more recent dates}
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,ID
- {}
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Name
- {Program Files}
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Permissions
- {}
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Size
- 117983
-
- BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20,Version
- {}
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,Active
- Yes
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,Alias
- {}
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,CheckCondition
- {Before Pane is Displayed}
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,Comment
- {}
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,Component
- {}
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,FailureMessage
- {}
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,ID
- {}
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,Operator
- false
-
- BFF0AA9C-A6A8-490D-81E8-6BDF94581355,String
- <%SilentMode%>
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,Active
- Yes
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,Alias
- {}
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,CheckCondition
- {Before Pane is Displayed}
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,Comment
- {}
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,Component
- {}
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,FailureMessage
- {}
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,ID
- {}
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,Operator
- is
-
- C33F8E7D-7970-43C4-B653-FFA8CE170EC8,Platform
- Windows
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,Active
- Yes
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,Alias
- {}
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,CheckCondition
- {Before Pane is Displayed}
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,Comment
- {}
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,Component
- {}
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,FailureMessage
- {}
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,ID
- {}
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,Operator
- false
-
- C66D6544-4FCE-4697-B0E4-4B6F3A462973,String
- <%InstallStopped%>
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Active
- Yes
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Alias
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Background
- white
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Checked
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Comment
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Component
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Conditions
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,ExecuteAction
- {After Pane is Displayed}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Height
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,ID
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,IgnoreErrors
- No
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Text,subst
- 1
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Type
- checkbutton
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Value
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,VirtualText
- CreateDesktopShortcut
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Width
- {}
-
- C91C5668-E984-4541-871C-CF6194F3F71F,X
- 185
-
- C91C5668-E984-4541-871C-CF6194F3F71F,Y
- 180
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,Action
- {Install Actions}
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,Active
- Yes
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,Alias
- {}
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,Comment
- {}
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,Component
- {}
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,Conditions
- {}
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,EvaluateConditions
- Yes
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,ExecuteAction
- {After Pane is Displayed}
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,ID
- {}
-
- CBF10125-0D47-4DBB-9630-0CA6FDA9489B,IgnoreErrors
- No
-
- D0A37977-56A8-4296-9659-512D495FF25E,Active
- Yes
-
- D0A37977-56A8-4296-9659-512D495FF25E,Alias
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,Background
- white
-
- D0A37977-56A8-4296-9659-512D495FF25E,Checked
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,Comment
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,Component
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,Conditions
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,ExecuteAction
- {After Pane is Displayed}
-
- D0A37977-56A8-4296-9659-512D495FF25E,Height
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,ID
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,IgnoreErrors
- No
-
- D0A37977-56A8-4296-9659-512D495FF25E,Text,subst
- 1
-
- D0A37977-56A8-4296-9659-512D495FF25E,Type
- checkbutton
-
- D0A37977-56A8-4296-9659-512D495FF25E,Value
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,VirtualText
- CreateQuickLaunchShortcut
-
- D0A37977-56A8-4296-9659-512D495FF25E,Width
- {}
-
- D0A37977-56A8-4296-9659-512D495FF25E,X
- 185
-
- D0A37977-56A8-4296-9659-512D495FF25E,Y
- 200
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Active
- Yes
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Alias
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Background
- white
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Checked
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Comment
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Component
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Conditions
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,ExecuteAction
- {After Pane is Displayed}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Height
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,ID
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,IgnoreErrors
- No
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Text,subst
- 1
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Type
- checkbutton
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Value
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,VirtualText
- CreateQuickLaunchShortcut
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Width
- {}
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,X
- 185
-
- D1224075-F20A-4015-A39F-9DCE7111AF5B,Y
- 200
-
- D34364B6-8486-412D-914A-34A01B029D62,Active
- Yes
-
- D34364B6-8486-412D-914A-34A01B029D62,Alias
- {}
-
- D34364B6-8486-412D-914A-34A01B029D62,CheckCondition
- {Before Pane is Displayed}
-
- D34364B6-8486-412D-914A-34A01B029D62,Comment
- {}
-
- D34364B6-8486-412D-914A-34A01B029D62,Component
- {}
-
- D34364B6-8486-412D-914A-34A01B029D62,FailureMessage
- {}
-
- D34364B6-8486-412D-914A-34A01B029D62,Filename
- <%ProgramReadme%>
-
- D34364B6-8486-412D-914A-34A01B029D62,ID
- {}
-
- D34364B6-8486-412D-914A-34A01B029D62,Operator
- exists
-
- D9504B73-531B-4DAB-87F0-811824D98680,Active
- Yes
-
- D9504B73-531B-4DAB-87F0-811824D98680,Alias
- {}
-
- D9504B73-531B-4DAB-87F0-811824D98680,Comment
- {}
-
- D9504B73-531B-4DAB-87F0-811824D98680,Component
- {}
-
- D9504B73-531B-4DAB-87F0-811824D98680,Conditions
- {}
-
- D9504B73-531B-4DAB-87F0-811824D98680,ExecuteAction
- {After Pane is Displayed}
-
- D9504B73-531B-4DAB-87F0-811824D98680,ID
- {}
-
- D9504B73-531B-4DAB-87F0-811824D98680,IgnoreErrors
- No
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,Active
- Yes
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,Alias
- {}
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,CheckCondition
- {Before Pane is Displayed}
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,Comment
- {}
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,Component
- {}
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,FailureMessage
- {}
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,ID
- {}
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,Operator
- is
-
- DC88586F-6788-4678-A90C-4D79A8DE9BE4,Platform
- Windows
-
- DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E,Active
- Yes
-
- DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E,Alias
- {}
-
- DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E,Comment
- {}
-
- DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E,Components
- 25A03054-7BF5-4B4A-A5E8-98C36C53A0F9
-
- DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E,Description,subst
- 1
-
- DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E,ID
- {}
-
- DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E,Name
- Typical
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,Active
- Yes
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,Alias
- {}
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,CheckCondition
- {Before Pane is Displayed}
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,Comment
- {}
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,Component
- {}
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,FailureMessage
- {}
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,ID
- {}
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,Operator
- is
-
- DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD,Platform
- Windows
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,Active
- Yes
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,Alias
- {}
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,Comment
- {}
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,Component
- {}
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,Conditions
- {}
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,ExecuteAction
- {After Pane is Displayed}
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,ExitType
- Finish
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,ID
- {}
-
- E4876404-6179-4839-B6F0-0CE2C46F3AC0,IgnoreErrors
- No
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,Active
- Yes
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,Alias
- {}
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,Comment
- {}
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,Component
- {}
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,Conditions
- {2 conditions}
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,ExecuteAction
- {After Pane is Displayed}
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,ID
- {}
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,IgnoreErrors
- No
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,State
- disabled
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,Text
- {}
-
- EBE76197-B5AB-4228-BA51-F7780EFD5C07,Widget
- NextButton
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,Active
- Yes
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,Alias
- {}
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,Comment
- {}
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,Component
- {}
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,Conditions
- {}
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,ExecuteAction
- {After Pane is Displayed}
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,ID
- {}
-
- EE3898B7-7F54-4743-87F2-FCBF21BBC5C8,IgnoreErrors
- No
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,Active
- Yes
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,Alias
- {}
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,CheckCondition
- {Before Pane is Displayed}
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,Comment
- {}
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,Component
- {}
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,FailureMessage
- {}
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,Filename
- <%ProgramReadme%>
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,ID
- {}
-
- F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F,Operator
- exists
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,Active
- Yes
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,Alias
- {}
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,CheckCondition
- {Before Pane is Displayed}
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,Comment
- {}
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,Component
- {}
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,FailureMessage
- {}
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,ID
- {}
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,Operator
- false
-
- FB0A7015-A12E-4BF1-8044-9D46E9512987,String
- <%InstallStopped%>
-
- Linux-x86,Active
- No
-
- Linux-x86,BuildType
- dynamic
-
- Linux-x86,DefaultDirectoryPermission
- 00755
-
- Linux-x86,DefaultFilePermission
- 00755
-
- Linux-x86,Executable
- <%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>
-
- Linux-x86,InstallDir
- <%Home%>/<%ShortAppName%>
-
- Linux-x86,InstallType
- Typical
-
- Linux-x86,ProgramExecutable
- <%InstallDir%>/CompleteCalc
-
- Linux-x86,ProgramFolderAllUsers
- No
-
- Linux-x86,ProgramFolderName
- <%AppName%>
-
- Linux-x86,ProgramLicense
- <%InstallDir%>/LICENSE.txt
-
- Linux-x86,ProgramName
- {}
-
- Linux-x86,ProgramReadme
- <%InstallDir%>/README.txt
-
- Linux-x86,RequireRoot
- No
-
- Linux-x86,RootInstallDir
- /usr/local/<%ShortAppName%>
-
- Windows,Active
- Yes
-
- Windows,BuildType
- {}
-
- Windows,Executable
- <%AppName%>-<%Version%>-Setup<%Ext%>
-
- Windows,IncludeTWAPI
- No
-
- Windows,InstallDir
- <%PROGRAM_FILES%>/<%AppName%>
-
- Windows,InstallType
- Typical
-
- Windows,ProgramExecutable
- <%InstallDir%>/CompleteCalc.exe
-
- Windows,ProgramFolderAllUsers
- No
-
- Windows,ProgramFolderName
- <%AppName%>
-
- Windows,ProgramLicense
- <%InstallDir%>/LICENSE.txt
-
- Windows,ProgramName
- {}
-
- Windows,ProgramReadme
- <%InstallDir%>/README.txt
-
- Windows,WindowsIcon
- {Setup Blue Screen.ico}
-
- }
-
- array set ::InstallJammer::files {files.tcl {proc ::InstallJammer::InitFiles {} {
- File ::587BACB0-66F3-4357-A3D5-4FC492A0D68D -name {Complete Calc} -parent BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20 -type dir -directory <%InstallDir%> -mtime 1167339232 -filemethod "Update files with more recent dates"
- File ::0BA90803-0E15-424F-8801-3755F9EEAE8E -name CompleteCalc.exe -parent BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20 -directory <%InstallDir%> -size 114688 -mtime 1167338442 -filemethod "Update files with more recent dates"
- File ::93C36D6C-F13C-4D71-B3A5-4B573CB91642 -name LICENSE.txt -parent BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20 -directory <%InstallDir%> -size 3295 -mtime 1155563416 -filemethod "Update files with more recent dates"
-
- }} console.tcl ##\ \$Id\$\n##\n##\ Copyright\ (C)\ 2002\ \ Damon\ Courtney\n##\ \n##\ This\ program\ is\ free\ software\;\ you\ can\ redistribute\ it\ and/or\n##\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\n##\ as\ published\ by\ the\ Free\ Software\ Foundation\;\ either\ version\ 2\n##\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\n##\ \n##\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\n##\ but\ WITHOUT\ ANY\ WARRANTY\;\ without\ even\ the\ implied\ warranty\ of\n##\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\n##\ GNU\ General\ Public\ License\ for\ more\ details.\n##\ \n##\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\n##\ along\ with\ this\ program\;\ if\ not,\ write\ to\ the\n##\ \ \ \ \ Free\ Software\ Foundation,\ Inc.\n##\ \ \ \ \ 51\ Franklin\ Street,\ Fifth\ Floor\n##\ \ \ \ \ Boston,\ MA\ \ 02110-1301,\ USA.\n##\n\nif\ \{!\[info\ exists\ tk_patchLevel\]\}\ \{\ return\ \}\n\nset\ consoleInterp\ \[interp\ create\]\n\$consoleInterp\ eval\ \[list\ set\ tk_library\ \$tk_library\]\n\$consoleInterp\ alias\ exit\ exit\nload\ \"\"\ Tk\ \$consoleInterp\n\n#\ 2.\ A\ command\ 'console'\ in\ the\ application\ interpreter\n\;proc\ console\ \{\ sub\ \{optarg\ \{\}\}\ \}\ \[subst\ -nocommands\ \{\n\ \ \ \ switch\ -exact\ --\ \\\$sub\ \{\n\ \ \ \ \ \ \ title\ \{\n\t\ \ \ \$consoleInterp\ eval\ wm\ title\ .\ \[list\ \\\$optarg\]\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ hide\ \{\n\t\ \ \ \$consoleInterp\ eval\ wm\ withdraw\ .\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ show\ \{\n\t\ \ \ \$consoleInterp\ eval\ wm\ deiconify\ .\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ eval\ \{\n\t\ \ \ \$consoleInterp\ eval\ \\\$optarg\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ default\ \{\n\t\ \ \ error\ \"bad\ option\ \\\\\\\"\\\$sub\\\\\\\":\ should\ be\ hide,\ show,\ or\ title\"\n\ \ \ \ \ \ \ \}\n\ \ \ \}\n\}\]\n\n#\ 3.\ Alias\ a\ command\ 'consoleinterp'\ in\ the\ console\ window\ interpreter\n#\ \ \ \ \ \ \ to\ cause\ evaluation\ of\ the\ command\ 'consoleinterp'\ in\ the\n#\ \ \ \ \ \ \ application\ interpreter.\n\;proc\ consoleinterp\ \{sub\ cmd\}\ \{\n\ \ \ switch\ -exact\ --\ \$sub\ \{\n\ \ \ \ \ \ \ eval\ \{\n\t\ \ \ uplevel\ #0\ \$cmd\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ record\ \{\n\t\ \ \ history\ add\ \$cmd\n\t\ \ \ catch\ \{uplevel\ #0\ \$cmd\}\ retval\n\t\ \ \ return\ \$retval\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ default\ \{\n\t\ \ \ error\ \"bad\ option\ \\\"\$sub\\\":\ should\ be\ eval\ or\ record\"\n\ \ \ \ \ \ \ \}\n\ \ \ \}\n\}\nif\ \{\[package\ vsatisfies\ \[package\ provide\ Tk\]\ 4\]\}\ \{\n\ \ \ \$consoleInterp\ alias\ interp\ consoleinterp\n\}\ else\ \{\n\ \ \ \$consoleInterp\ alias\ consoleinterp\ consoleinterp\n\}\n\n#\ 4.\ Bind\ the\ <Destroy>\ event\ of\ the\ application\ interpreter's\ main\n#\ \ \ \ window\ to\ kill\ the\ console\ (via\ tkConsoleExit)\nbind\ .\ <Destroy>\ \[list\ +if\ \{\[string\ match\ .\ %W\]\}\ \[list\ catch\ \\\n\ \ \ \ \ \ \ \[list\ \$consoleInterp\ eval\ tkConsoleExit\]\]\]\n\n#\ 5.\ Redefine\ the\ Tcl\ command\ 'puts'\ in\ the\ application\ interpreter\n#\ \ \ \ so\ that\ messages\ to\ stdout\ and\ stderr\ appear\ in\ the\ console.\nrename\ puts\ tcl_puts\n\;proc\ puts\ \{args\}\ \[subst\ -nocommands\ \{\n\ \ \ switch\ -exact\ --\ \[llength\ \\\$args\]\ \{\n\ \ \ \ \ \ \ 1\ \{\n\t\ \ \ if\ \{\[string\ match\ -nonewline\ \\\$args\]\}\ \{\n\t\ \ \ \ \ \ \ if\ \{\[catch\ \{uplevel\ 1\ \[linsert\ \\\$args\ 0\ tcl_puts\]\}\ msg\]\}\ \{\n\t\t\ \ \ regsub\ -all\ tcl_puts\ \\\$msg\ puts\ msg\n\t\t\ \ \ return\ -code\ error\ \\\$msg\n\t\ \ \ \ \ \ \ \}\n\t\ \ \ \}\ else\ \{\n\t\ \ \ \ \ \ \ \$consoleInterp\ eval\ \[list\ tkConsoleOutput\ stdout\ \\\n\t\t\ \ \ \ \ \ \ \"\[lindex\ \\\$args\ 0\]\\n\"\]\n\t\ \ \ \}\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ 2\ \{\n\t\ \ \ if\ \{\[string\ match\ -nonewline\ \[lindex\ \\\$args\ 0\]\]\}\ \{\n\t\ \ \ \ \ \ \ \$consoleInterp\ eval\ \[list\ tkConsoleOutput\ stdout\ \\\n\t\t\ \ \ \ \ \ \ \[lindex\ \\\$args\ 1\]\]\n\t\ \ \ \}\ elseif\ \{\[string\ match\ stdout\ \[lindex\ \\\$args\ 0\]\]\}\ \{\n\t\ \ \ \ \ \ \ \$consoleInterp\ eval\ \[list\ tkConsoleOutput\ stdout\ \\\n\t\t\ \ \ \ \ \ \ \"\[lindex\ \\\$args\ 1\]\\n\"\]\n\t\ \ \ \}\ elseif\ \{\[string\ match\ stderr\ \[lindex\ \\\$args\ 0\]\]\}\ \{\n\t\ \ \ \ \ \ \ \$consoleInterp\ eval\ \[list\ tkConsoleOutput\ stderr\ \\\n\t\t\ \ \ \ \ \ \ \"\[lindex\ \\\$args\ 1\]\\n\"\]\n\t\ \ \ \}\ else\ \{\n\t\ \ \ \ \ \ \ if\ \{\[catch\ \{uplevel\ 1\ \[linsert\ \\\$args\ 0\ tcl_puts\]\}\ msg\]\}\ \{\n\t\t\ \ \ regsub\ -all\ tcl_puts\ \\\$msg\ puts\ msg\n\t\t\ \ \ return\ -code\ error\ \\\$msg\n\t\ \ \ \ \ \ \ \}\n\t\ \ \ \}\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ 3\ \{\n\t\ \ \ if\ \{!\[string\ match\ -nonewline\ \[lindex\ \\\$args\ 0\]\]\}\ \{\n\t\ \ \ \ \ \ \ if\ \{\[catch\ \{uplevel\ 1\ \[linsert\ \\\$args\ 0\ tcl_puts\]\}\ msg\]\}\ \{\n\t\t\ \ \ regsub\ -all\ tcl_puts\ \\\$msg\ puts\ msg\n\t\t\ \ \ return\ -code\ error\ \\\$msg\n\t\ \ \ \ \ \ \ \}\n\t\ \ \ \}\ elseif\ \{\[string\ match\ stdout\ \[lindex\ \\\$args\ 1\]\]\}\ \{\n\t\ \ \ \ \ \ \ \$consoleInterp\ eval\ \[list\ tkConsoleOutput\ stdout\ \\\n\t\t\ \ \ \ \ \ \ \[lindex\ \\\$args\ 2\]\]\n\t\ \ \ \}\ elseif\ \{\[string\ match\ stderr\ \[lindex\ \\\$args\ 1\]\]\}\ \{\n\t\ \ \ \ \ \ \ \$consoleInterp\ eval\ \[list\ tkConsoleOutput\ stderr\ \\\n\t\t\ \ \ \ \ \ \ \[lindex\ \\\$args\ 2\]\]\n\t\ \ \ \}\ else\ \{\n\t\ \ \ \ \ \ \ if\ \{\[catch\ \{uplevel\ 1\ \[linsert\ \\\$args\ 0\ tcl_puts\]\}\ msg\]\}\ \{\n\t\t\ \ \ regsub\ -all\ tcl_puts\ \\\$msg\ puts\ msg\n\t\t\ \ \ return\ -code\ error\ \\\$msg\n\t\ \ \ \ \ \ \ \}\n\t\ \ \ \}\n\ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ default\ \{\n\t\ \ \ if\ \{\[catch\ \{uplevel\ 1\ \[linsert\ \\\$args\ 0\ tcl_puts\]\}\ msg\]\}\ \{\n\t\ \ \ \ \ \ \ regsub\ -all\ tcl_puts\ \\\$msg\ puts\ msg\n\t\ \ \ \ \ \ \ return\ -code\ error\ \\\$msg\n\t\ \ \ \}\n\ \ \ \ \ \ \ \}\n\ \ \ \}\n\}\]\n\$consoleInterp\ alias\ puts\ puts\n\n#\ 6.\ No\ matter\ what\ Tk_Main\ says,\ insist\ that\ this\ is\ an\ interactive\ \ shell\nset\ tcl_interactive\ 1\n\n########################################################################\n#\ Evaluate\ the\ Tk\ library\ script\ console.tcl\ in\ the\ console\ interpreter\n########################################################################\n\$consoleInterp\ eval\ source\ \[list\ \[file\ join\ \$tk_library\ console.tcl\]\]\n\nconsole\ hide\n\n\$consoleInterp\ eval\ \{\n\ \ \ if\ \{!\[llength\ \[info\ commands\ tkConsoleExit\]\]\}\ \{\n\ \ \ \ \ \ \ tk::unsupported::ExposePrivateCommand\ tkConsoleExit\n\ \ \ \}\n\}\n\$consoleInterp\ eval\ \{\n\ \ \ if\ \{!\[llength\ \[info\ commands\ tkConsoleOutput\]\]\}\ \{\n\ \ \ \ \ \ \ tk::unsupported::ExposePrivateCommand\ tkConsoleOutput\n\ \ \ \}\n\}\nif\ \{\[string\ match\ 8.3.4\ \$tk_patchLevel\]\}\ \{\n\ \ \ #\ Workaround\ bug\ in\ first\ draft\ of\ the\ tkcon\ enhancments\n\ \ \ \$consoleInterp\ eval\ \{\n\ \ \ \ \ \ \ bind\ Console\ <Control-Key-v>\ \{\}\n\ \ \ \}\n\}\n#\ Restore\ normal\ \[puts\]\ if\ console\ widget\ goes\ away...\nproc\ Oc_RestorePuts\ \{slave\}\ \{\n\ \ \ \ rename\ puts\ \{\}\n\ \ \ \ rename\ tcl_puts\ puts\n\ \ \ \ interp\ delete\ \$slave\n\}\n\$consoleInterp\ alias\ Oc_RestorePuts\ Oc_RestorePuts\ \$consoleInterp\n\$consoleInterp\ eval\ \{\n\ \ \ \ bind\ Console\ <Destroy>\ +Oc_RestorePuts\n\}\n\nunset\ consoleInterp\n\nconsole\ title\ \"\[wm\ title\ .\]\ Console\" actions.tcl {namespace eval ::InstallJammer::actions {}
- proc ::InstallJammer::actions::AddWidget {obj} {
- global info
-
- set id [$obj id]
- set parent [$obj parent]
- set window [$parent window]
- set widget $window.[$obj name]
-
- if {![info exists ::InstallJammer]} {
- variable ::InstallJammer::UserWidgets
- if {[info exists UserWidgets($id)]} { return }
- set UserWidgets($id) $widget
- }
-
- $id window $widget
-
- $obj properties props
-
- set opts [list]
-
- set style T[string totitle $props(Type)]
-
- set value $props(Value)
- if {[string is true -strict $value]} {
- set value 1
- } elseif {[string is false -strict $value]} {
- set value 0
- }
-
- switch -- $props(Type) {
- "checkbutton" {
- set varopt -variable
- if {[string length $props(Checked)]} {
- set varval 0
- if {$props(Checked)} { set varval 1 }
- }
- }
-
- "entry" {
- set varopt -textvariable
- }
-
- "radiobutton" {
- set varopt -variable
- lappend opts -value $value
-
- if {[string is true -strict $props(Checked)]} {
- set varval $value
- }
- }
- }
-
- if {[info exists varopt] && [string length $props(VirtualText)]} {
- lappend opts $varopt ::info($props(VirtualText))
- if {[info exists varval]} {
- set ::info($props(VirtualText)) $varval
- }
- }
-
- ::InstallJammer::SetVirtualText $info(Language) $parent $id [::InstallJammer::GetText $id Text -subst 0]
- $parent set $id,subst $props(Text,subst)
-
- if {$props(Background) ne "system"} {
- ::InstallJammer::NewStyle $id $style -background $props(Background)
- lappend opts -style $id
- }
-
- eval [list ttk::$props(Type) $widget] $opts
-
- place $widget -in $window -x $props(X) -y $props(Y) -width $props(Width) -height $props(Height)
-
- $parent widget set $id -widget $widget
-
- ::InstallJammer::UpdateWidgets -widgets $id -step $parent
- }
-
- proc ::InstallJammer::actions::AddWindowsUninstallEntry {obj} {
- global conf
-
- if {!$conf(windows)} { return }
-
- $obj get RegistryKeyName appkey
-
- set properties {
- UninstallString
- QuietUninstallString
- DisplayName
- DisplayIcon
- DisplayVersion
- Comments
- Contact
- HelpLink
- HelpTelephone
- InstallDate
- InstallLocation
- InstallSource
- Publisher
- Readme
- URLInfoAbout
- URLUpdateInfo
- }
-
- eval $obj properties props [lsort $properties]
-
- set key {HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion}
- append key "\\Uninstall\\[::InstallJammer::SubstText $appkey]"
-
- ## Try to insert this first value. If it fails, it's probably
- ## because we don't have permission to write to the Uninstall registry
- ## for the local machine. We want to switch over and try to write to
- ## the current user's Uninstall registry instead.
- if {[catch { registry set $key NoModify 1 dword } error]} {
- set key {HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion}
- append key "\\Uninstall\\[::InstallJammer::SubstText $appkey]"
-
- registry set $key NoModify 1 dword
- }
-
- registry set $key NoRepair 1 dword
-
- foreach var [array names props] {
- registry set $key $var [::InstallJammer::SubstText $props($var)]
- }
-
- ::InstallJammer::LogRegistry $key
- }
-
- proc ::InstallJammer::actions::CreateInstallPanes {obj} {
- global info
-
- set parent [$obj parent]
- set progressbar [$parent widget get ProgressBar]
- if {![string length $progressbar]} { set progressbar noop }
-
- set children [$info(InstallMode) children recursive]
- set total [llength $children]
- foreach id $children {
- $progressbar configure -value [expr {[incr0 i] * 100 / $total}]
- update
- if {[$id ispane]} {
- $info(Wizard) createstep $id
- }
- }
- }
-
- proc ::InstallJammer::actions::ExecuteAction {obj} {
- set id [$obj id]
-
- if {[$obj get Action action] && [string length $action]} {
- $obj get EvaluateConditions eval
- return [::InstallJammer::ExecuteActions $action -parent $id -conditions $eval]
- }
- }
-
- proc ::InstallJammer::actions::ExecuteExternalProgram {obj} {
- set id [$obj id]
-
- $obj properties props
-
- set widget [join $props(ProgressiveOutputWidget) ""]
- set widget [[$obj parent] widget get $widget]
-
- set resultVarName [::InstallJammer::SubstText $props(ResultVirtualText)]
- set statusVarName [::InstallJammer::SubstText $props(StatusVirtualText)]
-
- set resultVar result
- if {[string length $resultVarName]} { set resultVar ::info($resultVarName) }
-
- set statusVar status
- if {[string length $statusVarName]} { set statusVar ::info($statusVarName) }
-
- set $statusVar 0
- set $resultVar ""
-
- ::InstallJammer::UpdateWidgets -update 1
-
- set workdir [::InstallJammer::SubstText $props(WorkingDirectory)]
- if {[string length $workdir] && [file exists $workdir]} {
- set pwd [pwd]
- cd $workdir
- }
-
- if {$props(ShowProgressiveOutput)} {
- set cmd [::InstallJammer::SubstText $props(ProgramCommandLine)]
-
- proc ::ReadOutput${id} { fp statusVar resultVar widget } {
- set data [read $fp]
-
- if {[eof $fp]} {
- set $statusVar [catch { close $fp }]
- return
- }
-
- if {$::conf(windows)} {
- ## For some reason, Windows wants to give us two
- ## newlines for every one that is actually output.
- set data [string map [list \n\n \n] $data]
- }
-
- append $resultVar $data
- if {[string length $widget] && [winfo class $widget] eq "Text"} {
- set auto [expr {[lindex [$widget yview] 1] == 1}]
-
- $widget configure -state normal
- $widget insert end $data
- $widget configure -state disabled
-
- ## If the user is all the way at the bottom of the text,
- ## we want to keep auto-scrolling to the bottom.
- if {$auto} { $widget yview moveto 1.0 }
-
- update idletasks
- }
- }
-
- set cmd [::InstallJammer::SubstForPipe $props(ProgramCommandLine)]
-
- if {[catch { open "|$cmd" } fp]} {
- set $statusVar 1
- set $resultVar $fp
- ::InstallJammer::UpdateWidgets -updateidletasks 1
- } else {
- fconfigure $fp -buffering none -blocking 0
- fileevent $fp readable [list ::ReadOutput${id} $fp $statusVar $resultVar $widget]
-
- if {$props(WaitForProgram)} { vwait $statusVar }
- }
- } else {
- set cmd [::InstallJammer::SubstForEval $props(ProgramCommandLine)]
-
- if {!$props(WaitForProgram)} {
- set $statusVar [catch { eval exec $cmd & } $resultVar]
- } else {
- set $statusVar [catch { eval exec $cmd } $resultVar]
- }
-
- ::InstallJammer::UpdateWidgets -updateidletasks 1
- }
-
- if {[info exists pwd]} { cd $pwd }
- }
-
- proc ::InstallJammer::actions::Exit {obj} {
- global info
-
- if {[$obj get ExitType] eq "Cancel"} {
- set info(InstallCancelled) 1
- }
-
- ## Walk through a list of possible exit routines and
- ## choose the best one we have.
- foreach command [list ::Exit ::InstallJammer::exit ::exit] {
- if {[::InstallJammer::CommandExists $command]} {
- $command
- }
- }
- }
-
- proc ::InstallJammer::actions::InstallDesktopShortcut {obj} {
- global conf
-
- set allusers [$obj get InstallForAllUsers]
-
- if {$conf(windows)} {
- if {$allusers} {
- $obj set ShortcutDirectory <%COMMON_DESKTOP%>
- } else {
- $obj set ShortcutDirectory <%DESKTOP%>
- }
- ::InstallJammer::actions::InstallWindowsShortcut $obj
- } else {
- if {[::InstallJammer::HasKDEDesktop]} {
- $obj set ShortcutDirectory <%KDEDesktop%>
- ::InstallJammer::actions::InstallUNIXShortcut $obj
- }
-
- if {[::InstallJammer::HasGnomeDesktop]} {
- $obj set ShortcutDirectory <%GnomeDesktop%>
- ::InstallJammer::actions::InstallUNIXShortcut $obj
- }
- }
- }
-
- proc ::InstallJammer::actions::InstallSelectedFiles {obj} {
- global info
- global conf
-
- update
-
- if {$conf(testing)} { return }
-
- set setups [SetupTypes children]
-
- ## If we have no setup types, we have nothing to do.
- if {![llength $setups]} { return }
-
- set setuptype [::InstallJammer::FindObjByName $info(InstallType) $setups]
-
- if {$setuptype eq ""} {
- return -code error "Install Selected Files failed: could not find current Setup Type in list of available Setup Types"
- }
-
- set conf(stop) [::InstallJammer::TmpDir .stop]
- set conf(pause) [::InstallJammer::TmpDir .pause]
-
- set id [$obj id]
- set parent [$obj parent]
-
- set conf(InstallID) $parent
-
- set info(TotalSize) 0
-
- set info(Status) "<%InstallPrepareText%>"
-
- set info(FileBeingInstalled) ""
- set info(GroupBeingInstalled) ""
-
- ::InstallJammer::UpdateWidgets -update 1
-
- set groups [list]
- foreach component [$setuptype get Components] {
- if {![$component active]} { continue }
-
- foreach filegroup [$component get FileGroups] {
- ## If we've already processed this file group,
- ## we don't need to do it again.
- if {[lsearch -exact $groups $filegroup] < 0} {
- lappend groups $filegroup
- iincr info(TotalSize) [$filegroup get Size]
-
- foreach file [$filegroup children] {
- if {![$file active]} { continue }
- lappend files($filegroup) $file
- }
- }
- }
- }
-
- if {![llength $groups]} {
- ## We didn't find any groups. We're done.
- set info(InstallFinished) 1
- return
- }
-
- set conf(InstallLog) [file join $info(InstallDir) install.log]
-
- set unpackBin [::installkit::base]
- set unpackInf [::InstallJammer::BuildUnpackInfo $groups files]
- set unpackScript [::InstallJammer::BuildUnpack]
-
- ::InstallJammer::ReadPreviousInstall
-
- set info(Installing) 1
- set info(InstallStarted) 1
-
- set info(Status) "<%FileBeingInstalledText%>"
-
- if {[info exists ::tcl_platform(threaded)]} {
- set tid [installkit::newThread thread::wait]
- set conf(UnpackThread) $tid
- thread::send $tid [list namespace eval ::InstallJammer {}]
- thread::send $tid [list source $unpackInf]
- thread::send -async $tid [list source $unpackScript]
-
- thread::errorproc ::InstallJammer::HandleThreadError
- } else {
- set cmd "|[list $unpackBin] [list $unpackScript] -- [list $unpackInf]"
- set conf(UnpackBin) $unpackBin
- set conf(UnpackFp) [open $cmd]
-
- fconfigure $conf(UnpackFp) -blocking 0
- fileevent $conf(UnpackFp) readable [list ::InstallJammer::ReadUnpack $parent]
- }
-
- vwait ::info(Installing)
-
- set info(Installing) 0
- set info(InstallFinished) 1
-
- if {$info(InstallStopped)} { return }
-
- ::InstallJammer::StoreInfo $info(InstallDir)
- ::InstallJammer::StoreInfo [::InstallJammer::InstallInfoDir]
-
- incr info(TotalSize) [::InstallJammer::InstallComponentsTotalSize]
-
- if {!$info(InstallStopped) && $conf(windows)} {
- ## Broadcast a message telling Windows that the environment
- ## has changed. This forces any environment variables
- ## changed during installation to be updated in all running
- ## Windows applications.
- set info(Status) "<%UpdateRegistryText%>"
- ::InstallJammer::UpdateWidgets -update 1
-
- registry broadcast Environment
- }
-
- ## If we saved files for rollback, we need to clean them up now.
- ## If the install was stopped in the middle, we don't want to do
- ## anything. The cleanup routines will take care of that.
- if {$conf(rollback) && $info(InstallStarted) && !$info(InstallStopped)} {
- set info(Status) "<%CleanupInstallText%>"
-
- ::InstallJammer::UpdateWidgets -update 1
-
- if {[info exists conf(LOG)]} {
- foreach line $conf(LOG) {
- if {[lindex $line 0] eq ":FILE"} {
- set file [lindex $line 1]
- set roll [::InstallJammer::RollbackName $file]
- if {[file exists $roll]} { file delete -force $roll }
- }
- }
- }
- }
-
- set info(FileBeingInstalled) ""
- set info(GroupBeingInstalled) ""
- }
-
- proc ::InstallJammer::actions::InstallUNIXShortcut {obj} {
- $obj properties props
-
- set path [::InstallJammer::SubstText $props(ShortcutDirectory)]
- set file [::InstallJammer::SubstText [file join $path $props(ShortcutName)]]
- if {![string match *.desktop $file]} { append file .desktop }
-
- if {![file exists $path]} { file mkdir $path }
-
- set fp [open $file w]
- puts $fp {[Desktop Entry]}
- puts $fp "Name=[::InstallJammer::SubstText $props(ShortcutName)]"
- puts $fp "Type=[::InstallJammer::SubstText $props(ShortcutType)]"
- puts $fp "URL=[::InstallJammer::SubstText $props(TargetFileName)]"
- puts $fp "Exec='[::InstallJammer::SubstText $props(TargetFileName)]'"
- if {![lempty $props(IconPath)]} {
- puts $fp "Icon=[::InstallJammer::SubstText $props(IconPath)]"
- }
-
- if {![lempty $props(AdditionalArguments)]} {
- puts $fp [::InstallJammer::SubstText $props(AdditionalArguments)]
- }
-
- close $fp
-
- close [open $file]
-
- ::InstallJammer::LogFile $file
- }
-
- proc ::InstallJammer::actions::InstallUninstaller {obj} {
- global info
- global conf
-
- set info(Status) [$obj get Message]
- ::InstallJammer::UpdateWidgets -update 1
-
- set uninstall [::InstallJammer::TmpDir uninstall.tcl]
-
- $obj get UninstallDirectory directory
- set uninstallBin [file join $directory uninstall<%Ext%>]
- set uninstallBin [::InstallJammer::SubstText $uninstallBin]
-
- ::InstallJammer::CreateDir [file dirname $uninstallBin]
-
- set arrays [list info ::InstallJammer::Properties]
-
- set fp [open $uninstall w]
- puts $fp "namespace eval ::InstallJammer {}"
-
- foreach array $arrays {
- puts $fp "array set $array [list [array get $array]]"
- }
-
- foreach file [list common.tcl gui.tcl conditions.tcl uninstall.tcl] {
- puts $fp $::InstallJammer::files($file)
- }
- close $fp
-
- set opts [list -noinstall -o $uninstallBin -w [::installkit::base]]
-
- if {$conf(windows)} {
- set desc "Uninstall <%AppName%> <%Version%>"
- lappend opts -filedescription [::InstallJammer::SubstText $desc]
- }
-
- set catalog [file join $::installkit::root catalogs messages]
- file copy $catalog [::InstallJammer::TmpDir]
- lappend opts -catalog [::InstallJammer::TmpDir messages]
-
- ## Create the uninstall binary.
- eval ::InstallJammer::Wrap $opts [list $uninstall]
-
- ::InstallJammer::LogFile $uninstallBin
- ::InstallJammer::SetVersionInfo $uninstallBin
- ::InstallJammer::SetPermissions $uninstallBin 00755
-
- set conf(uninstall) $uninstallBin
- set info(Uninstaller) $uninstallBin
-
- return 1
- }
-
- proc ::InstallJammer::actions::InstallWindowsShortcut {obj} {
- global conf
-
- if {!$conf(windows)} { return }
-
- $obj properties props
-
- set target [::InstallJammer::SubstText $props(TargetFileName)]
-
- if {![string match "*://*" $target] && ![file exists $target]} { return }
-
- lappend list -objectpath $target
-
- if {![lempty $props(WorkingDirectory)]} {
- lappend list -workingdirectory
- lappend list [::InstallJammer::SubstText $props(WorkingDirectory)]
- }
-
- if {![lempty $props(IconPath)]} {
- lappend list -icon [::InstallJammer::SubstText $props(IconPath)]
- lappend list $props(IconPathIndex)
- }
-
- if {![lempty $props(CommandLineArguments)]} {
- lappend list -arguments
- lappend list [::InstallJammer::SubstText $props(CommandLineArguments)]
- }
-
- lappend list -showcommand $props(WindowState)
-
- set dir [::InstallJammer::SubstText $props(ShortcutDirectory)]
- set linkPath [::InstallJammer::SubstText $props(ShortcutName)]
- set linkPath [file join $dir $linkPath]
- if {![string match *.lnk $linkPath]} { append linkPath .lnk }
-
- if {![file exists $dir]} { ::InstallJammer::CreateDir $dir }
-
- eval [list ::installkit::Windows::createShortcut $linkPath] $list
- ::InstallJammer::LogFile $linkPath
- }
-
- proc ::InstallJammer::actions::ModifyWidget {obj} {
- global info
-
- set parent [$obj parent]
-
- $obj properties props
-
- if {![string length $props(Widget)]} { return }
-
- set args [list]
- if {[string length $props(Text)]} { lappend args -text $props(Text) }
- if {[string length $props(State)]} { lappend args -state $props(State) }
-
- if {![llength $args]} { return }
-
- foreach widget [split $props(Widget) \;] {
- set widget [join [string trim $widget] ""]
- switch -- $widget {
- "BackButton" - "NextButton" - "CancelButton" {
- set widget [string tolower [string map {Button ""} $widget]]
- eval [list $info(Wizard) itemconfigure $widget] $args
- }
-
- default {
- set widget [$parent widget get $widget]
- eval [list $widget configure] $args
- }
- }
- }
-
- update idletasks
- }
-
- proc ::InstallJammer::actions::MoveForward {obj} {
- global info
-
- set next [$info(Wizard) step next]
-
- ## If this is the last step, call the action to exit the install.
- if {![string length $next]} {
- ::InstallJammer::actions::Exit $obj
- } else {
- after 0 [list $info(Wizard) next 1]
- }
- }
-
- proc ::InstallJammer::actions::TextWindow {obj} {
- global info
-
- set wizard [::InstallJammer::Wizard]
-
- set id [$obj id]
-
- $id window .[$id name]
- set top [$id window]
-
- $obj properties props
-
- toplevel $top
- wm withdraw $top
- wm title $top [::InstallJammer::GetText $id Title]
- wm transient $top [::InstallJammer::TransientParent]
- wm geometry $top $props(Width)x$props(Height)
-
- grid rowconfigure $top 1 -weight 1
- grid columnconfigure $top 0 -weight 1
-
- if {$props(GrabFocus)} {
- ::InstallJammer::Grab $top
- bind $top <Destroy> [list ::InstallJammer::Grab release $top]
- }
-
- ::InstallJammer::PlaceWindow $id -width $props(Width) -height $props(Height)
-
- if {[string length [::InstallJammer::GetText $id Caption]]} {
- label $top.caption -anchor w
- grid $top.caption -row 0 -column 0 -padx 5 -pady [list 5 10] -sticky w
- $id widget set Caption -widget $top.caption
- }
-
- text $top.message -bg white -bd 2 -relief sunken -wrap $props(TextWrap) -yscrollcommand [list $top.vs set] -xscrollcommand [list $top.hs set]
- grid $top.message -row 1 -column 0 -padx [list 5 0] -sticky news
- $id widget set Message -widget $top.message
-
- ttk::scrollbar $top.vs -command [list $top.message yview]
- grid $top.vs -row 1 -column 1 -sticky ns -padx [list 0 5]
-
- ttk::scrollbar $top.hs -command [list $top.message xview] -orient horizontal
- grid $top.hs -row 2 -column 0 -sticky ew -padx [list 5 0] -pady [list 0 5]
-
- set width [string length [::InstallJammer::GetText $id CloseButton]]
- if {$width < 12} { set width 12 }
-
- ttk::button $top.close -width $width -command [list destroy $top]
- grid $top.close -row 3 -column 0 -padx 5 -pady 5 -sticky e -columnspan 2
- $id widget set CloseButton -widget $top.close
-
- set file [::InstallJammer::SubstText $props(TextFile)]
- if {[file exists $file]} {
- $id set Message,subst 0
- ::InstallJammer::SetVirtualText $info(Language) $id Message [read_file $file]
- }
-
- ::InstallJammer::UpdateWidgets -step $id -updateidletasks 1
-
- focus $top.message
-
- wm deiconify $top
-
- if {$props(WaitOnWindow)} { tkwait window $top }
- }
-
- } gui.tcl {proc ::InitGui {} {
- if {[catch { package require Tk } error]} {
- puts "This program must be run in a graphical environment"
- puts "or in silent, unattended mode (with the -S option)."
- ::exit 1
- }
- wm withdraw .
- array set ::images {F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Icon {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif} 7F7C9C19-3650-4E50-8B27-32C9644DF62B,Icon {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif} E407FB36-48CE-4081-9051-6BAA771E761A,Image {c:/program files/installjammer/images/modern/setupmodern01.gif} A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3,Image {c:/program files/installjammer/images/modern/setupmodern01.gif} 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D,Icon {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif} 4C3FF654-9F5C-4679-B71D-F23E14F61844,Image {c:/program files/installjammer/images/modern/setupmodern01.gif} A2E136B8-114D-4028-876B-5F7DE6E5D06C,Image {c:/program files/installjammer/images/modern/setupmodern01.gif} 44F378EE-B695-45D5-96FE-1BBC93596B1F,Icon {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif} 39A03798-2744-48BB-8077-84B333E50E14,Icon {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif} 354BBA54-2679-44CC-B528-BB123868926D,Icon {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif} 26169907-3309-4C13-80BA-E6392EFA3702,Icon {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif}}
- image create photo {c:/program files/installjammer/images/modern/small/setupmodernsmall01.gif} -data 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
- image create photo {c:/program files/installjammer/images/modern/setupmodern01.gif} -data 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
-
-
-
- package require Tcl 8.1.1
-
- namespace eval Widget {
- variable _class
- variable _tk_widget
-
- variable _theme 0
-
- variable _optiontype
- array set _optiontype {
- TkResource Widget::_test_tkresource
- BwResource Widget::_test_bwresource
- Enum Widget::_test_enum
- Int Widget::_test_int
- Boolean Widget::_test_boolean
- Boolean2 Widget::_test_boolean2
- String Widget::_test_string
- Flag Widget::_test_flag
- Synonym Widget::_test_synonym
- Color Widget::_test_color
- Color2 Widget::_test_color2
- Padding Widget::_test_padding
- }
-
- proc use {} {}
- }
-
-
- proc Widget::CreateTempWidget { class {command frame} } {
- set class [string map [list :: ""] $class]
- set path ".#BWidget.#Class#$class"
- if {![winfo exists .#BWidget]} { frame .#BWidget }
- if {![winfo exists $path]} {
- if {[string equal $command "frame"]
- || [string equal $command "toplevel"]} {
- $command $path -class $class
- if {[string equal $command "toplevel"]} { wm withdraw $path }
- } else {
- $command $path
- }
- }
- return $path
- }
-
-
- proc Widget::tkinclude { class tkwidget subpath args } {
- foreach {cmd lopt} $args {
- switch -- $cmd {
- remove {
- foreach option $lopt {
- set remove($option) 1
- }
- }
-
- include {
- foreach option $lopt {
- set include($option) 1
- }
- }
-
- prefix {
- set prefix [lindex $lopt 0]
- foreach option [lrange $lopt 1 end] {
- set rename($option) "-$prefix[string range $option 1 end]"
- }
- }
-
- rename - readonly - initialize {
- array set $cmd $lopt
- }
-
- default {
- return -code error "invalid argument \"$cmd\""
- }
- }
- }
-
- namespace eval $class {}
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::map classmap
- upvar 0 ${class}::map$subpath submap
- upvar 0 ${class}::optionExports exports
- upvar 0 ${class}::subpaths subpaths
-
- if {![info exists subpaths($subpath)]} { set subpaths($subpath) [list] }
- eval [list lappend subpaths($subpath)] [array get initialize]
-
- set widg [Widget::CreateTempWidget $tkwidget $tkwidget]
- foreach optdesc [_get_tkwidget_options $tkwidget] {
- set option [lindex $optdesc 0]
-
- if {[info exists remove($option)]} { continue }
- if {[info exists include] && ![info exists include($option)]} {continue}
-
- if {[llength $optdesc] == 3} {
- set syn [lindex $optdesc 1]
- if {![info exists remove($syn)]} {
- if {[info exists rename($syn)]} {
- set classopt($option) [list Synonym $rename($syn)]
- } else {
- set classopt($option) [list Synonym $syn]
- }
- }
-
- continue
- }
-
- set ro 0
- set value [lindex $optdesc 1]
- set realopt $option
-
- if {[info exists rename($option)]} {
- set realopt $option
- set option $rename($option)
- }
-
- if {[info exists readonly($option)]} {
- set ro $readonly($option)
- }
-
- set optionval [list $tkwidget $realopt]
- set classopt($option) [list TkResource $value $ro $optionval]
-
- if {![info exists initialize($option)]} {
- set conf [_configure_option $option ""]
- set dbName [lindex $conf 0]
- set dbClass [lindex $conf 1]
-
- set def [option get $widg $dbName $dbClass]
- if {[string length $def]} {
- set value $def
- lappend subpaths($subpath) $option $value
- }
- }
-
-
- lappend classmap($option) $subpath "" $realopt
- set submap($realopt) $option
- }
- }
-
-
- proc Widget::bwinclude { class subclass subpath args } {
- upvar 0 ${subclass}::opt subclassopt
-
- foreach {cmd lopt} $args {
- switch -- $cmd {
- remove {
- foreach option $lopt {
- set remove($option) 1
- }
- }
-
- include {
- foreach option $lopt {
- set include($option) 1
- }
- }
-
- prefix {
- set prefix [lindex $lopt 0]
- set options [lrange $lopt 1 end]
- set doremove [string equal [lindex $options 0] "remove"]
- if {![llength $options] || $doremove} {
- set options [list]
- set toremove [lrange $options 1 end]
- foreach option [array names subclassopt] {
- if {[lsearch -exact $toremove $option] < 0} {
- lappend options $option
- }
- }
- }
-
- foreach option $options {
- set rename($option) "-$prefix[string range $option 1 end]"
- }
- }
-
- rename - readonly - initialize {
- array set $cmd $lopt
- }
-
- default {
- return -code error "invalid argument \"$cmd\""
- }
- }
- }
-
- namespace eval $class {}
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::map classmap
- upvar 0 ${class}::map$subpath submap
- upvar 0 ${class}::optionExports exports
- upvar 0 ${subclass}::optionExports subexports
- upvar 0 ${class}::subpaths subpaths
-
- if {![info exists subpaths($subpath)]} { set subpaths($subpath) [list] }
- eval [list lappend subpaths($subpath)] [array get initialize]
-
- set path [Widget::CreateTempWidget $class]
- foreach {option optdesc} [array get subclassopt] {
- set subOption $option
-
- if {[info exists remove($option)]} { continue }
- if {[info exists include] && ![info exists include($option)]} {continue}
-
- set type [lindex $optdesc 0]
- if {[string equal $type "Synonym"]} {
- set syn [lindex $optdesc 1]
- if {![info exists remove($syn)]} {
- if {[info exists rename($syn)]} {
- set classopt($option) [list Synonym $rename($syn)]
- } else {
- set classopt($option) [list Synonym $syn]
- }
- }
- continue
- }
-
- set ro [lindex $optdesc 2]
- set value [lindex $optdesc 1]
- set realopt $option
-
- if {[info exists rename($option)]} {
- set realopt $option
- set option $rename($option)
- }
-
- if {[info exists initialize($option)]} {
- set value $initialize($option)
- }
-
- if {[info exists readonly($option)]} {
- set ro $readonly($option)
- }
-
- if {![info exists initialize($option)]} {
- set conf [_configure_option $option ""]
- set dbName [lindex $conf 0]
- set dbClass [lindex $conf 1]
-
- set def [option get $path $dbName $dbClass]
- if {[string length $def]} {
- set value $def
- lappend subpaths($subpath) $option $value
- }
- }
-
- set classopt($option) [list $type $value $ro [lindex $optdesc 3]]
-
-
- lappend classmap($option) $subpath $subclass $realopt
- set submap($realopt) $option
- }
- }
-
-
- proc Widget::declare { class optlist } {
- variable _optiontype
-
- namespace eval $class {}
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::optionExports exports
- upvar 0 ${class}::optionClass optionClass
-
- set path [Widget::CreateTempWidget $class]
- foreach optdesc $optlist {
- set option [lindex $optdesc 0]
- set optdesc [lrange $optdesc 1 end]
- set type [lindex $optdesc 0]
-
- if {![info exists _optiontype($type)]} {
- return -code error "invalid option type \"$type\""
- }
-
- if {[string equal $type "Synonym"]} {
- set syn [lindex $optdesc 1]
- if {![info exists classopt($syn)]} {
- return -code error "unknow option \"$syn\" for Synonym \"$option\""
- }
- set classopt($option) [list Synonym $syn]
- continue
- }
-
- set value [lindex $optdesc 1]
- set ro [lindex $optdesc 2]
- set arg [lindex $optdesc 3]
-
- set conf [_configure_option $option ""]
- set dbName [lindex $conf 0]
- set dbClass [lindex $conf 1]
- set default [option get $path $dbName $dbClass]
-
- if {[string equal $type "BwResource"]} {
- set subclass [lindex $arg 0]
- set realopt [lindex $arg 1]
- if {![string length $realopt]} { set realopt $option }
-
- upvar 0 ${subclass}::opt subclassopt
- if {![info exists subclassopt($realopt)]} {
- return -code error "unknow option \"$realopt\""
- }
-
- set suboptdesc $subclassopt($realopt)
- if {![string length $value]} {
- set value [lindex $suboptdesc 1]
- }
-
- set type [lindex $suboptdesc 0]
- set ro [lindex $suboptdesc 2]
- set arg [lindex $suboptdesc 3]
- set classopt($option) [list $type $value $ro $arg]
- continue
- }
-
- if {[string equal $type "TkResource"]} {
- set tkwidget [lindex $arg 0]
- set widg [Widget::CreateTempWidget $tkwidget $tkwidget]
- set realopt [lindex $arg 1]
- if { ![string length $realopt] } {
- set realopt $option
- }
- set tkoptions [_get_tkwidget_options $tkwidget]
- if {![string length $value]} {
- set ind [lsearch $tkoptions [list $realopt *]]
- set value [lindex [lindex $tkoptions $ind] end]
- }
- set classopt($option) [list TkResource $value $ro [list $tkwidget $realopt]]
- set optionClass($option) [lindex [$widg configure $realopt] 1]
- continue
- }
-
- if {[string equal $type "Color"]} {
- if {[info exists ::BWidget::colors($value)]} {
- set value $::BWidget::colors($value)
- }
- }
-
-
- set classopt($option) [list $type $value $ro $arg]
- }
- }
-
-
- proc Widget::define { class filename args } {
- variable _inuse
- variable ::BWidget::use
-
- proc ::${class}::use {} {}
-
- if {[set x [lsearch -exact $args "-classonly"]] > -1} {
- set args [lreplace $args $x $x]
- } else {
- interp alias {} ::${class} {} ${class}::create
-
- proc ::${class}::cget { path option } {
- return [Widget::cget $path $option]
- }
-
- proc ::${class}::configure { path args } {
- return [Widget::configure $path $args]
- }
-
- bind $class <Destroy> [list Widget::destroy %W]
- }
-
- set _inuse($class) 0
-
- set use($class) $args
- set use($class,file) $filename
- lappend use(classes) $class
-
- foreach class $args { ${class}::use }
- }
-
-
- proc Widget::create { class path {rename 1} } {
- if {$rename} { rename $path ::$path:cmd }
- set cmd "${class}::\$cmd"
- proc ::$path { cmd args } [subst {return \[eval \[linsert \$args 0 $cmd [list $path]\]\]}]
- return $path
- }
-
-
- proc Widget::addmap { class subclass subpath options } {
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::optionExports exports
- upvar 0 ${class}::optionClass optionClass
- upvar 0 ${class}::map classmap
- upvar 0 ${class}::map$subpath submap
- upvar 0 ${class}::subpaths subpaths
-
- if {![info exists subpaths($subpath)]} { set subpaths($subpath) [list] }
-
- foreach {option realopt} $options {
- if {![string length $realopt]} { set realopt $option }
-
-
- lappend classmap($option) $subpath $subclass $realopt
- set submap($realopt) $option
-
- lappend subpaths($subpath) $realopt [lindex $classopt($option) 1]
- }
- }
-
-
- proc Widget::syncoptions { class subclass subpath options } {
- upvar 0 ${class}::sync classync
- upvar 0 ${class}::subpaths subpaths
-
- if {![info exists subpaths($subpath)]} { set subpaths($subpath) [list] }
-
- foreach {option realopt} $options {
- if {![string length $realopt]} { set realopt $option }
- set classync($option) [list $subpath $subclass $realopt]
- }
- }
-
-
- proc Widget::init { class path options {initFromODB 0} } {
- variable _inuse
-
- upvar 0 Widget::_optiontype opttype
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::map classmap
- upvar 0 ${class}::$path:opt pathopt
- upvar 0 ${class}::$path:mod pathmod
- upvar 0 ${class}::$path:init pathinit
-
- if {[info exists pathopt]} { unset pathopt }
- if {[info exists pathmod]} { unset pathmod }
-
- set fpath $path
- set rdbclass [string map [list :: ""] $class]
- if {![winfo exists $path]} { set fpath [Widget::CreateTempWidget $class] }
-
- foreach {option optdesc} [array get classopt] {
- set pathmod($option) 0
- if {[info exists classmap($option)]} { continue }
-
- set type [lindex $optdesc 0]
- if {[string equal $type "Synonym"]} { continue }
-
- set alt ""
- if {[string equal $type "TkResource"]} {
- set alt [lindex [lindex $optdesc 3] 1]
- }
-
- set optdb [lindex [_configure_option $option $alt] 0]
- set def [option get $fpath $optdb $rdbclass]
- if {[string length $def]} {
- set pathopt($option) $def
- } else {
- set pathopt($option) [lindex $optdesc 1]
- }
- }
-
- if {![info exists _inuse($class)]} { set _inuse($class) 0 }
- incr _inuse($class)
-
- set Widget::_class($path) $class
-
- if {$initFromODB} {
- array set pathopt $options
- } else {
- foreach {option value} $options {
- if {![info exists classopt($option)]} {
- unset pathopt
- unset pathmod
- return -code error "unknown option \"$option\""
- }
-
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- if {[string equal $type "Synonym"]} {
- set option [lindex $optdesc 1]
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- }
-
- set arg [lindex $optdesc 3]
- set pathopt($option) [$opttype($type) $option $value $arg]
- set pathinit($option) $pathopt($option)
- }
- }
- }
-
-
-
- proc Widget::initFromODB { class path options } {
- Widget::init $class $path $options 1
- }
-
-
-
-
- proc Widget::copyinit { class templatepath path options } {
- upvar 0 ${class}::opt classopt ${class}::$path:opt pathopt ${class}::$path:mod pathmod ${class}::$path:init pathinit ${class}::$templatepath:opt templatepathopt ${class}::$templatepath:mod templatepathmod ${class}::$templatepath:init templatepathinit
-
- if {[info exists pathopt]} { unset pathopt }
- if {[info exists pathmod]} { unset pathmod }
-
- array set pathmod [array get templatepathmod]
- array set pathopt [array get templatepathopt]
- array set pathinit [array get templatepathinit]
-
- set Widget::_class($path) $class
- foreach {option value} $options {
- if {![info exists classopt($option)]} {
- unset pathopt
- unset pathmod
- return -code error "unknown option \"$option\""
- }
-
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- if {[string equal $type "Synonym"]} {
- set option [lindex $optdesc 1]
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- }
-
- set arg [lindex $optdesc 3]
- set pathopt($option) [$Widget::_optiontype($type) $option $value $arg]
- set pathinit($option) $pathopt($option)
- }
- }
-
-
- proc Widget::parseArgs { class options {errorOut 1} } {
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::map classmap
-
- foreach {option val} $options {
- if {![info exists classopt($option)]} {
- if {$errorOut} { return -code error "unknown option \"$option\"" }
- continue
- }
-
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- if {[string equal $type "Synonym"]} {
- set option [lindex $optdesc 1]
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- }
-
- if {[string equal $type "TkResource"]} {
- Widget::_get_tkwidget_options [lindex [lindex $optdesc 3] 0]
- }
-
- set val [$Widget::_optiontype($type) $option $val [lindex $optdesc 3]]
-
- if {[info exists classmap($option)]} {
- foreach {subpath subclass realopt} $classmap($option) {
- lappend maps($subpath) $realopt $val
- }
- } else {
- lappend maps($class) $option $val
- }
- }
-
- return [array get maps]
- }
-
-
-
- proc Widget::initArgs { class options arrayName } {
- upvar 1 $arrayName maps
- upvar 0 ${class}::subpaths subpaths
-
- array set maps [list $class {} :cmd {}]
- foreach subpath [array names subpaths] {
- set maps($subpath) [list]
- }
-
- array set maps [array get subpaths]
-
- foreach {var val} [Widget::parseArgs $class $options] {
- eval lappend maps($var) $val
- }
- }
-
-
-
- proc Widget::splitArgs { options args } {
- array set maps [list :cmd {}]
- foreach class $args {
- if {![info exists maps($class)]} { set maps($class) [list] }
- array set maps [Widget::parseArgs $class $options 0]
- }
-
- return [array get maps]
- }
-
-
- proc Widget::optionExists { class option } {
- return [info exists ${class}::opt($option)]
- }
-
-
- proc Widget::class { path } {
- if {[info exists Widget::_class($path)]} { return $Widget::_class($path) }
- return -code error "unknown widget $path"
- }
-
-
- proc Widget::destroy { path {unsetVariables 1} } {
- variable _class
- variable _inuse
-
- if {[info exists _class($path)]} {
- set class $_class($path)
-
- if {[info exists _inuse($class)]} { incr _inuse($class) -1 }
-
- if {![string equal [info commands $path] ""]} { rename $path "" }
-
- foreach x {opt mod init} {
- if {[info exists ${class}::$path:$x]} {
- unset ${class}::$path:$x
- }
- }
-
- if {$unsetVariables} { eval unset [info vars ${class}::$path:*] }
-
- unset _class($path)
- }
- }
-
-
- proc Widget::configure { path options } {
- set len [llength $options]
- if {$len < 2} { return [_get_configure $path $options] }
- if {$len % 2} { return -code error "incorrect number of arguments" }
-
- variable _class
- variable _optiontype
-
- set class $_class($path)
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::map classmap
- upvar 0 ${class}::$path:opt pathopt
- upvar 0 ${class}::$path:mod pathmod
-
- set window [_get_window $class $path]
- foreach {option value} $options {
- if {![info exists classopt($option)]} {
- return -code error "unknown option \"$option\""
- }
-
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- if {[string equal $type "Synonym"]} {
- set option [lindex $optdesc 1]
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- }
-
- if {[lindex $optdesc 2]} { continue }
-
- set newval [$_optiontype($type) $option $value [lindex $optdesc 3]]
-
- if {[info exists classmap($option)]} {
- set window [_get_window $class $window]
- foreach {subpath subclass realopt} $classmap($option) {
- if {[string length $subclass]} {
- set curval [${subclass}::cget $window$subpath $realopt]
- ${subclass}::configure $window$subpath $realopt $newval
- } else {
- set curval [$window$subpath cget $realopt]
- $window$subpath configure $realopt $newval
- }
- }
- } else {
- set curval $pathopt($option)
- set pathopt($option) $newval
- }
-
- set pathmod($option) [expr {![string equal $newval $curval]}]
- }
-
- return
- }
-
-
- proc Widget::cget { path option } {
- if {![info exists ::Widget::_class($path)]} {
- return -code error "unknown widget \"$path\""
- }
-
- set class $::Widget::_class($path)
- if {![info exists ${class}::opt($option)]} {
- return -code error "unknown option \"$option\""
- }
-
- set optdesc [set ${class}::opt($option)]
- set type [lindex $optdesc 0]
- if {[string equal $type "Synonym"]} {
- set option [lindex $optdesc 1]
- }
-
- if {[info exists ${class}::map($option)]} {
- foreach {subpath subclass realopt} [set ${class}::map($option)] {break}
- set path "[_get_window $class $path]$subpath"
- return [$path cget $realopt]
- }
- upvar 0 ${class}::$path:opt pathopt
- set pathopt($option)
- }
-
-
- proc Widget::subcget { path subwidget } {
- set class $::Widget::_class($path)
- upvar 0 ${class}::$path:opt pathopt
- upvar 0 ${class}::map$subwidget submap
- upvar 0 ${class}::$path:init pathinit
-
- set result [list]
- foreach realopt [array names submap] {
- if {[info exists pathinit($submap($realopt))]} {
- lappend result $realopt $pathopt($submap($realopt))
- }
- }
- return $result
- }
-
-
- proc Widget::hasChanged { path option varName } {
- upvar 1 $varName value
- Widget::getVariable $path mod pathmod
-
- set value [Widget::cget $path $option]
- set result $pathmod($option)
- set pathmod($option) 0
-
- return $result
- }
-
- proc Widget::hasChangedX { path option args } {
- set class $::Widget::_class($path)
- upvar 0 ${class}::$path:mod pathmod
-
- set result $pathmod($option)
- set pathmod($option) 0
- foreach option $args {
- lappend result $pathmod($option)
- set pathmod($option) 0
- }
-
- set result
- }
-
-
- proc Widget::anyChangedX { path args } {
- set class $::Widget::_class($path)
- upvar 0 ${class}::$path:mod pathmod
-
- set result 0
- foreach option $args {
- incr result $pathmod($option)
- set pathmod($option) 0
- }
- return $result
- }
-
-
- proc Widget::getoption { path option } {
- set class $::Widget::_class($path)
- upvar 0 ${class}::${path}:opt pathopt
- set pathopt($option)
- }
-
-
- proc Widget::setoption { path args } {
- set class $::Widget::_class($path)
- upvar 0 ${class}::${path}:opt pathopt
- foreach [list option value] $args {
- set pathopt($option) $value
- }
- }
-
-
- proc Widget::getMegawidgetOption { path option } {
- set class $::Widget::_class($path)
- upvar 0 ${class}::${path}:opt pathopt
- set pathopt($option)
- }
-
-
- proc Widget::setMegawidgetOption { path option value } {
- set class $::Widget::_class($path)
- upvar 0 ${class}::${path}:opt pathopt
- set pathopt($option) $value
- }
-
-
- proc Widget::_get_window { class path } {
- set idx [expr {[string last "#" $path] + 1}]
- if {$idx && [string equal [string range $path $idx end] $class]} {
- return [string range $path 0 [expr {$idx - 2}]]
- }
- return $path
- }
-
-
- proc Widget::_get_configure { path options } {
- variable _class
-
- set class $_class($path)
- upvar 0 ${class}::opt classopt
- upvar 0 ${class}::$path:opt pathopt
-
- if {[llength $options] == 1} {
- set option [lindex $options 0]
- if { ![info exists classopt($option)] } {
- return -code error "unknown option \"$option\""
- }
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- if { [string equal $type "Synonym"] } {
- set option [lindex $optdesc 1]
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- }
- if { [string equal $type "TkResource"] } {
- set alt [lindex [lindex $optdesc 3] 1]
- } else {
- set alt ""
- }
-
- set res [list $option]
- eval lappend res [_configure_option $option $alt]
- lappend res [lindex $optdesc 1] [${class}::cget $path $option]
-
- return $res
- }
-
-
- set result [list]
- foreach option [lsort [array names classopt]] {
- set alt ""
- set syn ""
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
-
- if {[string equal $type "Synonym"]} {
- set syn $option
- set option [lindex $optdesc 1]
- set optdesc $classopt($option)
- set type [lindex $optdesc 0]
- }
-
- if {[string equal $type "TkResource"]} {
- set alt [lindex [lindex $optdesc 3] 1]
- }
-
- set res [_configure_option $option $alt]
- if {![string length $syn]} {
- lappend result [concat $option $res [list [lindex $optdesc 1]] [list [cget $path $option]]]
- } else {
- lappend result [list $syn [lindex $res 0]]
- }
- }
-
- return $result
- }
-
-
- proc Widget::_configure_option { option altopt } {
- variable _optiondb
- variable _optionclass
-
- if {[info exists _optiondb($option)]} {
- set optdb $_optiondb($option)
- } else {
- set optdb [string range $option 1 end]
- }
-
- if {[info exists _optionclass($option)]} {
- set optclass $_optionclass($option)
- } elseif {[string length $altopt]} {
- if {[info exists _optionclass($altopt)]} {
- set optclass $_optionclass($altopt)
- } else {
- set optclass [string range $altopt 1 end]
- }
- } else {
- set optclass [string range $option 1 end]
- }
-
- return [list $optdb $optclass]
- }
-
-
- proc Widget::_get_tkwidget_options { tkwidget } {
- variable _tk_widget
- variable _optiondb
- variable _optionclass
-
- if {![info exists _tk_widget($tkwidget)]} {
- set widget [Widget::CreateTempWidget $tkwidget $tkwidget]
-
- set config [$widget configure]
- foreach optlist $config {
- set opt [lindex $optlist 0]
- if {[llength $optlist] == 2} {
- set refsyn [lindex $optlist 1]
-
- set idx [lsearch $config [list * $refsyn *]]
- if {$idx == -1} {
- if {[string index $refsyn 0] == "-"} {
- set idx [lsearch $config [list $refsyn * *]]
- } else {
- set refsyn [string tolower $refsyn]
- set idx [lsearch $config [list -$refsyn * *]]
- }
-
- if {$idx == -1} {
- return -code error "can't find option of synonym $opt"
- }
- }
-
- set syn [lindex [lindex $config $idx] 0]
- set def [lindex [lindex $config $idx] 4]
- lappend _tk_widget($tkwidget) [list $opt $syn $def]
- } else {
- set def [lindex $optlist 4]
- lappend _tk_widget($tkwidget) [list $opt $def]
- set _optiondb($opt) [lindex $optlist 1]
- set _optionclass($opt) [lindex $optlist 2]
- }
- }
- }
-
- return $_tk_widget($tkwidget)
- }
-
-
- proc Widget::_test_tkresource { option value arg } {
- set tkwidget [lindex $arg 0]
- set realopt [lindex $arg 1]
- set path [Widget::CreateTempWidget $tkwidget $tkwidget]
- set old [$path cget $realopt]
- $path configure $realopt $value
- set res [$path cget $realopt]
- $path configure $realopt $old
- return $res
- }
-
-
- proc Widget::_test_bwresource { option value arg } {
- return -code error "bad option type BwResource in widget"
- }
-
-
- proc Widget::_test_synonym { option value arg } {
- return -code error "bad option type Synonym in widget"
- }
-
- proc Widget::_test_color { option value arg } {
- if {[info exists ::BWidget::colors($value)]} {
- set value $::BWidget::colors($value)
- }
-
- if {[catch {winfo rgb . $value} color]} {
- return -code error "bad $option value \"$value\": must be a colorname or #RRGGBB"
- }
-
- return $value
- }
-
-
- proc Widget::_test_color2 { option value arg } {
- if {![string length $value]} { return }
-
- if {[info exists ::BWidget::colors($value)]} {
- set value $::BWidget::colors($value)
- }
-
- if {[catch {winfo rgb . $value} color]} {
- return -code error "bad $option value \"$value\": must be a colorname or #RRGGBB"
- }
-
- return $value
- }
-
-
- proc Widget::_test_string { option value arg } {
- return $value
- }
-
-
- proc Widget::_test_flag { option value arg } {
- set len [string length $value]
- set res ""
- for {set i 0} {$i < $len} {incr i} {
- set c [string index $value $i]
- if {[string first $c $arg] == -1} {
- set name [string range $option 1 end]
- return -code error [BWidget::badOptionString $name $value $arg]
- }
- if {[string first $c $res] == -1} { append res $c }
- }
- return $res
- }
-
-
- proc Widget::_test_enum { option value arg } {
- if {[lsearch -exact $arg $value] == -1} {
- set name [string range $option 1 end]
- return -code error [BWidget::badOptionString $name $value $arg]
- }
- return $value
- }
-
-
- proc Widget::_test_int { option value arg } {
- set map [list %d $value]
- if {![string is int -strict $value]
- || ([string length $arg] && ![expr [string map $map $arg]])} {
- return -code error "bad $option value \"$value\": must be integer ($arg)"
- }
- return $value
- }
-
-
- proc Widget::_test_boolean { option value arg } {
- if {![string is boolean -strict $value]} {
- set name [string range $option 1 end]
- return -code error [BWidget::badOptionString $name $value boolean]
- }
-
- return [string is true $value]
- }
-
-
- proc Widget::_test_boolean2 { option value arg } {
- if {![string is boolean $value]} {
- set name [string range $option 1 end]
- set opts [list empty boolean]
- return -code error [BWidget::badOptionString $name $value $opts]
- }
-
- if {[string length $value]} { return [string is true $value] }
- }
-
-
- proc Widget::_test_padding { option values arg } {
- set len [llength $values]
- if {$len < 1 || $len > 2} {
- return -code error "bad pad value \"$values\": must be positive screen distance"
- }
-
- foreach value $values {
- set map [list %d $value]
- if {![string is int -strict $value]
- || ([string length $arg] && ![expr [string map $map $arg]])} {
- return -code error "bad pad value \"$value\": must be positive screen distance"
- }
- }
- return $values
- }
-
-
- proc Widget::_get_padding { args } {
- if {[llength $args] == 2} {
- set padding [lindex $args 0]
- set index [lindex $args 1]
- } elseif {[llength $args] == 3} {
- set path [lindex $args 0]
- set option [lindex $args 1]
- set index [lindex $args 2]
- set padding [Widget::cget $path $option]
- }
- set val [lindex $padding $index]
- if {![string length $val]} { set val [lindex $padding 0] }
- return $val
- }
-
-
- proc Widget::focusNext { w } {
- set cur $w
- while 1 {
-
-
- set parent $cur
- set children [winfo children $cur]
- set i -1
-
-
- while 1 {
- incr i
- if {$i < [llength $children]} {
- set cur [lindex $children $i]
- if {[winfo toplevel $cur] == $cur} {
- continue
- } else {
- break
- }
- }
-
-
- set cur $parent
- if {[winfo toplevel $cur] == $cur} {
- break
- }
- set parent [winfo parent $parent]
- set children [winfo children $parent]
- set i [lsearch -exact $children $cur]
- }
- if {($cur == $w) || [focusOK $cur]} {
- return $cur
- }
- }
- }
-
-
- proc Widget::focusPrev { w } {
- set cur $w
- while 1 {
-
-
- if {[winfo toplevel $cur] == $cur} {
- set parent $cur
- set children [winfo children $cur]
- set i [llength $children]
- } else {
- set parent [winfo parent $cur]
- set children [winfo children $parent]
- set i [lsearch -exact $children $cur]
- }
-
-
- while {$i > 0} {
- incr i -1
- set cur [lindex $children $i]
- if {[winfo toplevel $cur] == $cur} {
- continue
- }
- set parent $cur
- set children [winfo children $parent]
- set i [llength $children]
- }
- set cur $parent
- if {($cur == $w) || [focusOK $cur]} {
- return $cur
- }
- }
- }
-
-
- proc Widget::focusOK { w } {
- set code [catch {$w cget -takefocus} value]
- if {$code == 1} { return 0 }
-
- if {!$code && [string length $value]} {
- if {$value == 0} {
- return 0
- } elseif {$value == 1} {
- return [winfo viewable $w]
- } else {
- set value [uplevel \#0 $value $w]
- if {[string length $value]} { return $value }
- }
- }
-
- if {![winfo viewable $w]} { return 0 }
-
- set code [catch {$w cget -state} value]
- if {!$code && [string equal $value "disabled"]} { return 0 }
-
- set code [catch {$w cget -editable} value]
- if {!$code && $value == 0} { return 0 }
-
- set top [winfo toplevel $w]
- foreach tag [bindtags $w] {
- if {![string equal $tag $top]
- && ![string equal $tag "all"]
- && [string match *Key* [bind $tag]]} {
- return 1
- }
- }
- return 0
- }
-
-
- proc Widget::traverseTo { w } {
- set focus [focus]
- if {[string length $focus]} {
- event generate $focus <<TraverseOut>>
- }
- focus $w
-
- event generate $w <<TraverseIn>>
- }
-
-
-
- proc Widget::varForOption { path option } {
- variable _class
- variable _optiontype
-
- set class $_class($path)
- upvar 0 ${class}::$path:opt pathopt
-
- if {![info exists pathopt($option)]} {
- return -code error "unable to find variable for option \"$option\""
- }
-
- return ::Widget::${class}::$path:opt($option)
- }
-
-
- proc Widget::widgetVar { path varName } {
- set class $Widget::_class($path)
- return ::Widget::${class}::$path:$varName
- }
-
-
- proc Widget::getVariable { path varName {newVarName ""} } {
- if {![string length $newVarName]} { set newVarName $varName }
- uplevel 1 [list upvar \#0 [Widget::widgetVar $path $varName] $newVarName]
- }
-
-
- proc Widget::options { path args } {
- if {[llength $args]} {
- foreach option $args {
- lappend options [_get_configure $path $option]
- }
- } else {
- set options [_get_configure $path {}]
- }
-
- set result [list]
- foreach list $options {
- if {[llength $list] < 5} { continue }
- lappend result [lindex $list 0] [lindex $list end]
- }
- return $result
- }
-
-
- proc Widget::getOption { option default args } {
- foreach widget $args {
- set value [Widget::getoption $widget $option]
- if {$value != $default} { break }
- }
- return $value
- }
-
-
- proc Widget::cgetOption { option default args } {
- foreach widget $args {
- set value [Widget::cget $widget $option]
- if {$value != $default} { break }
- }
- return $value
- }
-
-
- proc Widget::nextIndex { path node } {
- Widget::getVariable $path autoIndex
- if {![info exists autoIndex]} { set autoIndex -1 }
- return [string map [list #auto [incr autoIndex]] $node]
- }
-
-
- proc Widget::exists { path } {
- return [info exists ::Widget::_class($path)]
- }
-
-
- proc Widget::theme {{bool {}}} {
- variable _theme
- if {[llength [info level 0]] == 2} {
- if {[catch {package require tile 0.6}]
- && [catch {package require tile 1}]} {
- return -code error "BWidget's theming requires tile 0.6+"
- } else {
- catch {style default BWSlim.Toolbutton -padding 0}
- }
- set _theme [string is true -strict $bool]
- }
- return $_theme
- }
-
-
- namespace eval BWidget {
- variable _gstack [list]
- variable _fstack [list]
- }
-
-
- proc BWidget::use { args } {
- variable includes
-
- if {![llength $args]} {
- BWidget::use aqua [expr {$::tcl_version >= 8.4
- && [string equal [tk windowingsystem] "aqua"]}]
- return
- }
-
- set package [lindex $args 0]
- set value [lindex $args 1]
- set force [string equal [lindex $args 2] "-force"]
- if {![string length $value]} { set value 1 }
-
- if {$value && ($force || ![info exists includes($package)])} {
- switch -- $package {
- "aqua" {
-
- }
-
- "png" {
- if {[catch { package require img::png } err]} {
- if {[catch { package require tkpng } err]} {
- return -code error "Could not find img::png or tkpng package to support PNG data"
- } else {
- set ::BWidget::imageFormat png
- }
- } else {
- set ::BWidget::imageFormat PNG
- }
-
- set ::BWidget::iconLibraryFile [file join $::BWidget::imageDir BWidget.png.tkico]
- }
-
- "ttk" {
- Widget::theme 1
-
- variable ::BWidget::colors
-
- foreach {opt val} [style configure .] {
- switch -- $opt {
- "-background" {
- set colors(SystemButtonFace) $val
- }
-
- "-foreground" {
- set colors(SystemWindowText) $val
- }
-
- "-selectbackground" {
- set colors(SystemHighlight) $val
- }
-
- "-selectforeground" {
- set colors(SystemHighlightText) $val
- }
-
- "-troughcolor" {
- set colors(SystemScrollbar) $val
- }
- }
- }
- }
- }
- }
-
- set includes($package) $value
- return $value
- }
-
-
- proc BWidget::using { package } {
- if {[info exists ::BWidget::includes($package)]} {
- return $::BWidget::includes($package)
- }
- return 0
- }
-
-
- proc BWidget::globalexists { varName } {
- return [uplevel \#0 [list info exists $varName]]
- }
-
-
- proc BWidget::setglobal { varName value } {
- return [uplevel \#0 [list set $varName $value]]
- }
-
-
- proc BWidget::getglobal { varName } {
- return [uplevel \#0 [list set $varName]]
- }
-
-
- proc BWidget::traceglobal { cmd varName args } {
- return [uplevel \#0 [list trace $cmd $varName] $args]
- }
-
-
-
- proc BWidget::lreorder { list neworder } {
- set pos 0
- set newlist {}
- foreach e $neworder {
- if { [lsearch -exact $list $e] != -1 } {
- lappend newlist $e
- set tabelt($e) 1
- }
- }
- set len [llength $newlist]
- if { !$len } {
- return $list
- }
- if { $len == [llength $list] } {
- return $newlist
- }
- set pos 0
- foreach e $list {
- if { ![info exists tabelt($e)] } {
- set newlist [linsert $newlist $pos $e]
- }
- incr pos
- }
- return $newlist
- }
-
-
- proc BWidget::lremove { list args } {
- foreach elem $args {
- set x [lsearch -exact $list $elem]
- if {$x > -1} { set list [lreplace $list $x $x] }
- }
- return $list
- }
-
-
- proc BWidget::lassign { list args } {
- foreach elem $list varName $args {
- if {[string equal $varName ""]} { break }
- uplevel 1 [list set $varName $elem]
- }
- }
-
-
- proc BWidget::assert { exp {msg ""}} {
- set res [uplevel 1 expr $exp]
- if { !$res} {
- if { $msg == "" } {
- return -code error "Assertion failed: {$exp}"
- } else {
- return -code error $msg
- }
- }
- }
-
-
- proc BWidget::clonename { menu } {
- set path ""
- set menupath ""
- set found 0
- foreach widget [lrange [split $menu "."] 1 end] {
- if { $found || [winfo class "$path.$widget"] == "Menu" } {
- set found 1
- append menupath "#" $widget
- append path "." $menupath
- } else {
- append menupath "#" $widget
- append path "." $widget
- }
- }
- return $path
- }
-
-
- proc BWidget::getname { name } {
- if { [string length $name] } {
- set text [option get . "${name}Name" ""]
- if { [string length $text] } {
- return [parsetext $text]
- }
- }
- return {}
- }
-
-
- proc BWidget::parsetext { text } {
- set result ""
- set index -1
- set start 0
- while { [string length $text] } {
- set idx [string first "&" $text]
- if { $idx == -1 } {
- append result $text
- set text ""
- } else {
- set char [string index $text [expr {$idx+1}]]
- if { $char == "&" } {
- append result [string range $text 0 $idx]
- set text [string range $text [expr {$idx+2}] end]
- set start [expr {$start+$idx+1}]
- } else {
- append result [string range $text 0 [expr {$idx-1}]]
- set text [string range $text [expr {$idx+1}] end]
- incr start $idx
- set index $start
- }
- }
- }
- return [list $result $index]
- }
-
-
- proc BWidget::get3dcolor { path bgcolor {multiplier 0} {divideBy 100} } {
- set fmt "#%04x%04x%04x"
-
- if {$multiplier} {
- foreach val [winfo rgb $path $bgcolor] {
- lappend list [expr {$multiplier * $val / $divideBy}]
- }
- return [eval format $fmt $list]
- }
-
- if {[string equal $bgcolor "SystemButtonFace"]} {
- lappend list System3dDarkShadow SystemButtonHighlight
- lappend list SystemButtonShadow System3dLight
- return $list
- }
-
- foreach val [winfo rgb $path $bgcolor] {
- lappend dark [expr {48 * $val / 100}]
- lappend dark2 [expr {72 * $val / 100}]
-
- set tmp1 [expr {14*$val/10}]
- if { $tmp1 > 65535 } { set tmp1 65535 }
-
- set tmp2 [expr {(65535+$val)/2}]
- lappend light [expr {($tmp1 > $tmp2) ? $tmp1:$tmp2}]
-
- set tmp [expr {92 * $val / 90}]
- lappend light2 [expr {($tmp > 65535) ? 65535 : $tmp}]
- }
-
- lappend list [eval format $fmt $dark]
- lappend list [eval format $fmt $light]
- lappend list [eval format $fmt $dark2]
- lappend list [eval format $fmt $light2]
-
- return $list
- }
-
-
- proc BWidget::color2hex { path color } {
- if {[catch { winfo rgb $path $color } rgb]} {
- return -code error "Invalid color '$color'"
- }
- foreach {r g b} $rgb { break }
- return [format {#%4.4x%4.4x%4.4x} $r $g $b]
- }
-
-
- proc BWidget::getGradientColors { col1Str col2Str size {offset 0} } {
- if {[catch { winfo rgb . $col1Str } color1]} {
- return -code error "Invalid color '$col1Str'"
- }
-
- if {[catch { winfo rgb . $col2Str } color2]} {
- return -code error "Invalid color '$col2Str'"
- }
-
- set max [expr {$size - $offset}]
-
- foreach {r1 g1 b1} $color1 { break }
- foreach {r2 g2 b2} $color2 { break }
- set rRange [expr {double($r2) - $r1}]
- set gRange [expr {double($g2) - $g1}]
- set bRange [expr {double($b2) - $b1}]
- set rRatio [expr {$rRange / $max}]
- set gRatio [expr {$gRange / $max}]
- set bRatio [expr {$bRange / $max}]
-
- set colors [list]
-
- for {set i 0} {$i < $offset} {incr i} {
- lappend colors [format {#%4.4x%4.4x%4.4x} $r1 $g1 $b1]
- }
-
- for {set i 0} {$i < $max} {incr i} {
- set nR [expr {int( $r1 + ($rRatio * $i) )}]
- set nG [expr {int( $g1 + ($gRatio * $i) )}]
- set nB [expr {int( $b1 + ($bRatio * $i) )}]
- lappend colors [format {#%4.4x%4.4x%4.4x} $nR $nG $nB]
- }
-
- return $colors
- }
-
-
- proc BWidget::XLFDfont { cmd args } {
- switch -- $cmd {
- create {
- set font "-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
- }
- configure {
- set font [lindex $args 0]
- set args [lrange $args 1 end]
- }
- default {
- return -code error "XLFDfont: command incorrect: $cmd"
- }
- }
- set lfont [split $font "-"]
- if { [llength $lfont] != 15 } {
- return -code error "XLFDfont: description XLFD incorrect: $font"
- }
-
- foreach {option value} $args {
- switch -- $option {
- -foundry { set index 1 }
- -family { set index 2 }
- -weight { set index 3 }
- -slant { set index 4 }
- -size { set index 7 }
- default { return -code error "XLFDfont: option incorrect: $option" }
- }
- set lfont [lreplace $lfont $index $index $value]
- }
- return [join $lfont "-"]
- }
-
-
-
- proc BWidget::place { path w h args } {
- update idletasks
- if {$w == 0} { set w [winfo reqwidth $path] }
- if {$h == 0} { set h [winfo reqheight $path] }
-
- set arglen [llength $args]
- if { $arglen > 3 } {
- return -code error "BWidget::place: bad number of argument"
- }
-
- if { $arglen > 0 } {
- set where [lindex $args 0]
- set list [list "at" "center" "left" "right" "above" "below"]
- set idx [lsearch -exact $list $where]
- if { $idx == -1 } {
- return -code error [BWidget::badOptionString position $where $list]
- }
- if { $idx == 0 } { ## at
- set err [catch {
- set x [expr int([lindex $args 1])]
- set y [expr int([lindex $args 2])]
- }]
- if { $err } {
- return -code error "BWidget::place: incorrect position"
- }
- if {[string equal $::tcl_platform(platform) "windows"]} {
- if {[string index [lindex $args 1] 0] != "-"} {
- set x "+$x"
- }
- if {[string index [lindex $args 2] 0] != "-"} {
- set y "+$y"
- }
- } else {
- if { $x >= 0 } {
- set x "+$x"
- }
- if { $y >= 0 } {
- set y "+$y"
- }
- }
- } else {
- if { $arglen == 2 } {
- set widget [lindex $args 1]
- if { ![winfo exists $widget] } {
- set msg "BWidget::place: \"$widget\" does not exist"
- return -code error $msg
- }
- } else {
- set widget .
- }
-
- set sw [winfo screenwidth $path]
- set sh [winfo screenheight $path]
- set rootx [winfo rootx $widget]
- set rooty [winfo rooty $widget]
-
- if { $idx == 1 } { ## center
- if { $arglen == 2 } {
- set x0 [expr {$rootx + ([winfo width $widget] - $w)/2}]
- set y0 [expr {$rooty + ([winfo height $widget] - $h)/2}]
- } else {
- set x0 [expr {($sw - $w)/2 - [winfo vrootx $path]}]
- set y0 [expr {($sh - $h)/2 - [winfo vrooty $path]}]
- }
- set x "+$x0"
- set y "+$y0"
- if {$::tcl_platform(platform) != "windows"} {
- if { $x0+$w > $sw } {set x "-0"; set x0 [expr {$sw-$w}]}
- if { $x0 < 0 } {set x "+0"}
- if { $y0+$h > $sh } {set y "-0"; set y0 [expr {$sh-$h}]}
- if { $y0 < 0 } {set y "+0"}
- }
- } else {
- set x0 $rootx
- set y0 $rooty
- set x1 [expr {$x0 + [winfo width $widget]}]
- set y1 [expr {$y0 + [winfo height $widget]}]
- if { $idx == 2 || $idx == 3 } { ## left or right
- set y "+$y0"
- if {$::tcl_platform(platform) != "windows"} {
- if { $y0+$h > $sh } {set y "-0"; set y0 [expr {$sh-$h}]}
- if { $y0 < 0 } {set y "+0"}
- }
- if { $idx == 2 } {
- if { $x0 >= $w } {
- set x [expr {$x0-$sw}]
- } elseif { $x1+$w <= $sw } {
- set x "+$x1"
- } else {
- set x "+0"
- }
- } else {
- if { $x1+$w <= $sw } {
- set x "+$x1"
- } elseif { $x0 >= $w } {
- set x [expr {$x0-$sw}]
- } else {
- set x "-0"
- }
- }
- } else { ## above or below
- set x "+$x0"
- if {[string equal $::tcl_platform(platform) "windows"]} {
- if { $x0+$w > $sw } {set x "-0"; set x0 [expr {$sw-$w}]}
- if { $x0 < 0 } {set x "+0"}
- }
- if { $idx == 4 } {
- if { $h <= $y0 } {
- set y [expr {$y0-$sh}]
- } elseif { $y1+$h <= $sh } {
- set y "+$y1"
- } else {
- set y "+0"
- }
- } else {
- if { $y1+$h <= $sh } {
- set y "+$y1"
- } elseif { $h <= $y0 } {
- set y [expr {$y0-$sh}]
- } else {
- set y "-0"
- }
- }
- }
- }
- }
-
- if {[string is integer [string index $x 0]]} { set x +$x }
- if {[string is integer [string index $y 0]]} { set y +$y }
-
- wm geometry $path "${w}x${h}${x}${y}"
- } else {
- wm geometry $path "${w}x${h}"
- }
- update idletasks
- }
-
-
- proc BWidget::grab { option path } {
- variable _gstack
-
- if { $option == "release" } {
- catch {::grab release $path}
- while { [llength $_gstack] } {
- set grinfo [lindex $_gstack end]
- set _gstack [lreplace $_gstack end end]
- foreach {oldg mode} $grinfo {
- if { ![string equal $oldg $path] && [winfo exists $oldg] } {
- if { $mode == "global" } {
- catch {::grab -global $oldg}
- } else {
- catch {::grab $oldg}
- }
- return
- }
- }
- }
- } else {
- set oldg [::grab current]
- if { $oldg != "" } {
- lappend _gstack [list $oldg [::grab status $oldg]]
- }
- if { $option == "global" } {
- ::grab -global $path
- } else {
- ::grab $path
- }
- }
- }
-
-
- proc BWidget::focus { option path {refocus 1} } {
- variable _fstack
-
- if { $option == "release" } {
- while { [llength $_fstack] } {
- set oldf [lindex $_fstack end]
- set _fstack [lreplace $_fstack end end]
- if { ![string equal $oldf $path] && [winfo exists $oldf] } {
- if {$refocus} {catch {::focus -force $oldf}}
- return
- }
- }
- } elseif { $option == "set" } {
- lappend _fstack [::focus]
- ::focus -force $path
- }
- }
-
-
- proc BWidget::refocus {container component} {
- if { [string equal $container [::focus]] } {
- ::focus $component
- }
- return
- }
-
-
- proc BWidget::SetFocusGrab {grab {focus {}}} {
- variable _focusGrab
- set index "$grab,$focus"
-
- lappend _focusGrab($index) [::focus]
- set oldGrab [::grab current $grab]
- lappend _focusGrab($index) $oldGrab
- if {[winfo exists $oldGrab]} {
- lappend _focusGrab($index) [::grab status $oldGrab]
- }
- catch {::grab $grab}
- if {[winfo exists $focus]} {
- ::focus $focus
- }
- }
-
- proc BWidget::RestoreFocusGrab {grab focus {destroy destroy}} {
- variable _focusGrab
- set index "$grab,$focus"
- if {[info exists _focusGrab($index)]} {
- foreach {oldFocus oldGrab oldStatus} $_focusGrab($index) break
- unset _focusGrab($index)
- } else {
- set oldGrab ""
- }
-
- catch {::focus $oldFocus}
- ::grab release $grab
- if {[string equal $destroy "withdraw"]} {
- wm withdraw $grab
- } else {
- ::destroy $grab
- }
- if {[winfo exists $oldGrab] && [winfo ismapped $oldGrab]} {
- if {[string equal $oldStatus "global"]} {
- ::grab -global $oldGrab
- } else {
- ::grab $oldGrab
- }
- }
- }
-
- proc BWidget::badOptionString { type value list } {
- set list [lsort $list]
-
- set x [lsearch -exact $list "--"]
- if {$x > -1} {
- set list [lreplace $list $x $x]
- lappend list --
- }
-
- set last [lindex $list end]
- set list [lreplace $list end end]
- set msg "bad $type \"$value\": must be "
-
- if {![llength $list]} {
- append msg "$last"
- } elseif {[llength $list] == 1} {
- append msg "$list or $last"
- } else {
- append msg "[join $list ", "], or $last"
- }
-
- return $msg
- }
-
-
- proc BWidget::wrongNumArgsString { string } {
- return "wrong # args: should be \"$string\""
- }
-
-
- proc BWidget::read_file { file } {
- set fp [open $file]
- set x [read $fp [file size $file]]
- close $fp
- return $x
- }
-
-
- proc BWidget::classes { class } {
- variable use
-
- ${class}::use
- set classes [list $class]
- if {![info exists use($class)]} { return }
- foreach class $use($class) {
- eval lappend classes [classes $class]
- }
- return [lsort -unique $classes]
- }
-
-
- proc BWidget::library { args } {
- variable use
-
- set exclude [list]
- if {[set x [lsearch -exact $args "-exclude"]] > -1} {
- set exclude [lindex $args [expr {$x + 1}]]
- set args [lreplace $args $x [expr {$x + 1}]]
- }
-
- set libs [list widget init utils]
- set classes [list]
- foreach class $args {
- ${class}::use
- foreach c [classes $class] {
- if {[lsearch -exact $exclude $c] > -1} { continue }
- lappend classes $c
- }
- }
-
- eval lappend libs [lsort -unique $classes]
-
- set library ""
- foreach lib $libs {
- if {![info exists use($lib,file)]} {
- set file [file join $::BWIDGET::LIBRARY $lib.tcl]
- } else {
- set file [file join $::BWIDGET::LIBRARY $use($lib,file).tcl]
- }
- append library [read_file $file]
- }
-
- return $library
- }
-
-
- proc BWidget::inuse { class } {
- variable ::Widget::_inuse
-
- if {![info exists _inuse($class)]} { return 0 }
- return [expr $_inuse($class) > 0]
- }
-
-
- proc BWidget::write { filename {mode w} } {
- variable use
-
- if {![info exists use(classes)]} { return }
-
- set classes [list]
- foreach class $use(classes) {
- if {![inuse $class]} { continue }
- lappend classes $class
- }
-
- set fp [open $filename $mode]
- puts $fp [eval library $classes]
- close $fp
-
- return
- }
-
-
- proc BWidget::bindMouseWheel { widgetOrClass } {
- bind $widgetOrClass <MouseWheel> {
- if {![string equal [%W yview] "0 1"]} {
- %W yview scroll [expr {-%D/24}] units
- }
- }
-
- bind $widgetOrClass <Shift-MouseWheel> {
- if {![string equal [%W yview] "0 1"]} {
- %W yview scroll [expr {-%D/120}] pages
- }
- }
-
- bind $widgetOrClass <Control-MouseWheel> {
- if {![string equal [%W yview] "0 1"]} {
- %W yview scroll [expr {-%D/120}] units
- }
- }
-
- bind $widgetOrClass <Button-4> {event generate %W <MouseWheel> -delta 120}
- bind $widgetOrClass <Button-5> {event generate %W <MouseWheel> -delta -120}
- }
-
-
- proc BWidget::Icon { name } {
- return [$::BWidget::iconLibrary image $name]
- }
-
-
- proc BWidget::LoadBWidgetIconLibrary {} {
- if {![Widget::exists $::BWidget::iconLibrary]} {
- IconLibrary $::BWidget::iconLibrary -file $::BWidget::iconLibraryFile
- }
- }
-
-
- proc BWidget::LoadBWidgetTreeIcons {} {
- set dir [file join $::BWIDGET::LIBRARY images]
- image create photo BWidget::plus -file [file join $dir plus.gif]
- image create photo BWidget::minus -file [file join $dir minus.gif]
- }
-
-
- proc BWidget::CreateImage { gifdata pngdata args } {
- lappend args -format $::BWidget::imageFormat
- if {[BWidget::using png]} {
- lappend args -data $pngdata
- } else {
- lappend args -data $gifdata
- }
-
- return [eval image create photo $args]
- }
-
-
- proc BWidget::ParseArgs { _arrayName _arglist args } {
- upvar 1 $_arrayName array
-
- array set _args {
- -strict 0
- -options ""
- -switches ""
- -nocomplain 0
- }
- array set _args $args
- if {[info exists _args(-errorvar)]} { upvar 1 $_args(-errorvar) error }
-
- set options $_args(-options)
- set switches $_args(-switches)
-
- foreach switch $switches {
- set array([string range $switch 1 end]) 0
- }
-
- set array(OPTIONS) [list]
- set array(SWITCHES) [list]
-
- set oplen [llength $options]
- set swlen [llength $switches]
- set index 0
- set waiting 0
- foreach arg $_arglist {
- switch -glob -- $arg {
- "--" {
- incr index
- break
- }
-
- "-*" {
- if {$waiting} {
- set waiting 0
- set array($option) $arg
- lappend array(OPTIONS) -$option $arg
- } else {
- if {$swlen && [lsearch -exact $switches $arg] > -1} {
- lappend array(SWITCHES) $arg
- set array([string range $arg 1 end]) 1
- } elseif {$oplen && [lsearch -exact $options $arg] < 0} {
- if {$_args(-nocomplain)} { return 0 }
- return -code error "unknown option \"$arg\""
- } elseif {$_args(-strict)} {
- set switches [concat -- $_args(-switches)]
- set msg [BWidget::badOptionString option $arg $switches]
- return -code error $msg
- } else {
- set waiting 1
- set option [string range $arg 1 end]
- }
- }
- }
-
- default {
- if {$waiting} {
- set waiting 0
- set array($option) $arg
- lappend array(OPTIONS) -$option $arg
- } else {
- break
- }
- }
- }
-
- incr index
- }
-
- set array(ARGS) [lrange $_arglist $index end]
-
- return 1
- }
-
-
- proc BWidget::CopyBindings { from to } {
- foreach event [bind $from] {
- bind $to $event [bind $from $event]
- }
- }
-
-
- proc BWidget::DrawCanvasBorder { canvas relief color coords args } {
- lassign $coords x0 y0 x1 y1
- lassign [BWidget::get3dcolor $canvas $color] dark light dark2 light2
-
- switch -- $relief {
- "raised" - "sunken" {
- lappend lines [list $x0 $y1 $x0 $y0 $x1 $y0]
- lappend lines [list $x1 $y0 $x1 $y1 $x0 $y1]
- lappend lines [list [expr {$x0 + 1}] [expr {$y1 - 2}] [expr {$x0 + 1}] [expr {$y0 + 1}] [expr {$x1 - 1}] [expr {$y0 + 1}]]
- lappend lines [list [expr {$x0 + 1}] [expr {$y1 - 1}] [expr {$x1 - 1}] [expr {$y1 - 1}] [expr {$x1 - 1}] $y0]
-
- set colors [list $light $dark $light2 $dark2]
- if {[string equal $relief "sunken"]} {
- set colors [list $dark $light $dark2 $light2]
- }
- }
-
- "groove" - "ridge" {
- lappend lines [list $x0 $y1 $x1 $y1 $x1 $y0 $x1 [expr {$y0 + 1}] [expr {$x0 + 1}] [expr {$y0 + 1}] [expr {$x0 + 1}] $y1 ]
-
- lappend lines [list $x0 $y0 [expr {$x1 - 1}] $y0 [expr {$x1 - 1}] [expr {$y1 - 1}] $x0 [expr {$y1 - 1}] $x0 $y0 ]
-
- set colors [list $light $dark2]
- if {[string equal $relief "ridge"]} {
- set colors [list $dark2 $light]
- }
- }
-
- "rounded" {
- set coords [list [expr {$x0 + 1}] $y0 [expr {$x1 - 1}] $y0 $x1 [expr {$y0 + 1}] $x1 [expr {$y1 - 1}] [expr {$x1 - 1}] $y1 [expr {$x0 + 1}] $y1 $x0 [expr {$y1 - 1}] $x0 [expr {$y0 + 1}] [expr {$x0 + 1}] $y0 ]
-
- set opts [list -outline $dark2 -fill $color]
- eval [list $canvas create poly $coords] $opts $args
-
- return
- }
-
- "highlight" {
- set opts [list -outline $dark -fill $light]
- eval [list $canvas create rect $coords] $opts $args
-
- set coords [list [incr x0] [incr y0] [incr x1 -1] [incr y1 -1]]
- eval [list $canvas create rect $coords -outline $dark2] $args
-
- return
- }
- }
-
- foreach line $lines color $colors {
- eval [list $canvas create line $line -fill $color] $args
- }
- }
-
-
- if {[info exists ::InstallJammer]} { return }
-
- namespace eval ::BWIDGET {
- variable LIBRARY [file join $::installkit::root lib InstallJammer]
- }
-
- proc BWidgetInit {} {
- BWidget::use ttk 1 -force
-
- image create photo treeplus -data {R0lGODlhCQAJAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZAJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8Amf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///ywAAAAACQAJAAAINgARGBpI0JDABwgTPhiYEEBChggdPqDGEIBFixQNIfQHwB+1jB+pAQg5kBoCBNNSChRYcCCCgAA7}
-
- image create photo treeminus -data {R0lGODlhCQAJAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD//////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBmAABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNmZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZmzGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb//5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZAJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwAM8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8Amf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+ZzP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAkAAAhHAGGlMmQoVaFChmAZ+sew4T9VqRwyzEfw3zaL+fxVQ+gPhUeP/lSp8rct4zZt1DhSo4YP5bSC1KZNczZzWiGFqgwBGphKVUAAOw==}
-
- image create photo checkon -data {R0lGODlhEAAQAAAAACwAAAAAEAAQAIAAAAD///8CK4yPacDtfZ5kEaiKlaXLJsoFYLV5Ynl6IehkZ2e+XfSZoWZPD6nf1w9UFAAAOw==}
-
- image create photo checkoff -data {R0lGODlhEAAQAAAAACwAAAAAEAAQAIAAAAD///8CJYyPacDtfZ5kEaiKb6DLar55FwgqpGiKZXJqYTaq01PNkIvnRwEAOw==}
-
- set ::BWidget::iconLibraryFile [file join $::BWIDGET::LIBRARY icons.tkico]
-
- option add *Tree.background white widgetDefault
- option add *Tree.crossopenimage treeminus widgetDefault
- option add *Tree.crosscloseimage treeplus widgetDefault
-
- if {$::tcl_platform(platform) ne "windows"} {
- option add *font TkTextFont
- option add *background [style default . -background]
- option add *selectForeground [style default . -selectforeground]
- option add *selectBackground [style default . -selectbackground]
-
- option add *Listbox.background white
-
- option add *Entry.background white
- option add *Entry.borderWidth 1
-
- option add *Text.background white
- }
- }
-
- namespace eval DragSite { proc use {} {} }
- namespace eval DropSite { proc use {} {} }
- namespace eval DynamicHelp { proc use {} {} }
-
- proc DragSite::include { class type event } {
- set dragoptions [list [list -dragenabled Boolean 0 0] [list -draginitcmd String "" 0] [list -dragendcmd String "" 0] [list -dragtype String $type 0] [list -dragevent Enum $event 0 [list 1 2 3]] ]
- Widget::declare $class $dragoptions
- }
- proc DragSite::setdrag {args} { }
-
- proc DropSite::include { class types } {
- set dropoptions [list [list -dropenabled Boolean 0 0] [list -dropovercmd String "" 0] [list -dropcmd String "" 0] [list -droptypes String $types 0] ]
- Widget::declare $class $dropoptions
- }
-
- proc DynamicHelp::include { class type } {
- set helpoptions [list [list -helptext String "" 0] [list -helpvar String "" 0] [list -helptype Enum $type 0 [list balloon variable]] ]
- Widget::declare $class $helpoptions
- }
-
- proc DropSite::setdrop { args } { }
- proc DropSite::setcursor { args } { }
- proc DynamicHelp::sethelp { args } { }
-
- package provide BWidget 1.8
-
- BWidgetInit
- if {[string equal $::tcl_platform(platform) "windows"]} {
- option add *ListBox.background SystemWindow widgetDefault
- option add *ButtonBox.padY 0 widgetDefault
- option add *Dialog.padY 0 widgetDefault
- } else {
- option add *Scrollbar.width 12 widgetDefault
- option add *Scrollbar.borderWidth 1 widgetDefault
- option add *Dialog.separator 1 widgetDefault
- option add *MainFrame.relief raised widgetDefault
- option add *MainFrame.separator none widgetDefault
- option add *MessageDlg.usenative 0 widgetDefault
- }
-
- option read [file join $::BWIDGET::LIBRARY lang en.rc]
-
- bind Entry <<TraverseIn>> { %W selection range 0 end; %W icursor end }
- bind Spinbox <<TraverseIn>> { %W selection range 0 end; %W icursor end }
-
- bind all <Key-Tab> { Widget::traverseTo [Widget::focusNext %W] }
- bind all <<PrevWindow>> { Widget::traverseTo [Widget::focusPrev %W] }
-
- namespace eval ::BWidget {
- variable library $::BWIDGET::LIBRARY
- variable langDir [file join $library lang]
- variable imageDir [file join $library images]
- variable imageFormat GIF
-
- variable iconLibrary
- if {![info exists iconLibrary]} {
- set iconLibrary BWidgetIcons
- }
-
- variable iconLibraryFile
- if {![info exists iconLibraryFile]} {
- set iconLibraryFile [file join $imageDir BWidget.gif.tkico]
- }
-
- variable colors
- if {[string equal $::tcl_platform(platform) "windows"]} {
- array set colors {
- SystemButtonFace SystemButtonFace
- SystemButtonText SystemButtonText
- SystemDisabledText SystemDisabledText
- SystemHighlight SystemHighlight
- SystemHighlightText SystemHighlightText
- SystemMenu SystemMenu
- SystemMenuText SystemMenuText
- SystemScrollbar SystemScrollbar
- SystemWindow SystemWindow
- SystemWindowFrame SystemWindowFrame
- SystemWindowText SystemWindowText
- }
- } else {
- array set colors {
- SystemButtonFace #d9d9d9
- SystemButtonText black
- SystemDisabledText #a3a3a3
- SystemHighlight #c3c3c3
- SystemHighlightText white
- SystemMenu #d9d9d9
- SystemMenuText white
- SystemScrollbar #d9d9d9
- SystemWindow white
- SystemWindowFrame #d9d9d9
- SystemWindowText black
- }
- }
-
- if {[lsearch -exact [font names] "TkTextFont"] < 0} {
- catch {font create TkTextFont}
- catch {font create TkDefaultFont}
- catch {font create TkHeadingFont}
- catch {font create TkCaptionFont}
- catch {font create TkTooltipFont}
-
- switch -- [tk windowingsystem] {
- win32 {
- if {$::tcl_platform(osVersion) >= 5.0} {
- variable family "Tahoma"
- } else {
- variable family "MS Sans Serif"
- }
- variable size 8
-
- font configure TkDefaultFont -family $family -size $size
- font configure TkTextFont -family $family -size $size
- font configure TkHeadingFont -family $family -size $size
- font configure TkCaptionFont -family $family -size $size -weight bold
- font configure TkTooltipFont -family $family -size $size
- }
-
- classic - aqua {
- variable family "Lucida Grande"
- variable size 13
- variable viewsize 12
- variable smallsize 11
-
- font configure TkDefaultFont -family $family -size $size
- font configure TkTextFont -family $family -size $size
- font configure TkHeadingFont -family $family -size $smallsize
- font configure TkCaptionFont -family $family -size $size -weight bold
- font configure TkTooltipFont -family $family -size $viewsize
- }
-
- x11 {
- if {![catch {tk::pkgconfig get fontsystem} fs]
- && [string equal $fs "xft"]} {
- variable family "sans-serif"
- } else {
- variable family "Helvetica"
- }
- variable size -12
- variable ttsize -10
- variable capsize -14
-
- font configure TkDefaultFont -family $family -size $size
- font configure TkTextFont -family $family -size $size
- font configure TkHeadingFont -family $family -size $size -weight bold
- font configure TkCaptionFont -family $family -size $capsize -weight bold
- font configure TkTooltipFont -family $family -size $ttsize
- }
- }
- }
- } ; ## namespace eval ::BWidget
-
-
- namespace eval Label {
- Widget::define Label label DragSite DropSite DynamicHelp
-
- Widget::tkinclude Label label .l remove { -foreground -state -text -textvariable -underline }
-
- Widget::declare Label {
- {-name String "" 0}
- {-text String "" 0}
- {-textvariable String "" 0}
- {-underline Int -1 0 "%d >= -1"}
- {-focus String "" 0}
- {-foreground Color "SystemButtonText" 0}
- {-disabledforeground Color "SystemDisabledText" 0}
- {-state Enum normal 0 {normal disabled}}
-
- {-autowrap Boolean "0" 1}
- {-wrappadx Int "10" 0}
-
- {-elide Boolean "0" 1}
- {-ellipsis String "..." 0}
- {-elidepadx Int "5" 0}
- {-elideside Enum "right" 0 {center left right}}
-
- {-fg Synonym -foreground}
- }
-
- DynamicHelp::include Label balloon
- DragSite::include Label "" 1
- DropSite::include Label {
- TEXT {move {}}
- IMAGE {move {}}
- BITMAP {move {}}
- FGCOLOR {move {}}
- BGCOLOR {move {}}
- COLOR {move {}}
- }
-
- Widget::syncoptions Label "" .l {-text {} -underline {}}
-
- bind BwLabel <FocusIn> [list Label::setfocus %W]
- bind BwLabel <Destroy> [list Label::_destroy %W]
- }
-
-
- proc Label::create { path args } {
- Widget::initArgs Label $args maps
-
- frame $path -class Label -borderwidth 0 -highlightthickness 0 -relief flat
- Widget::initFromODB Label $path $maps(Label)
-
- Widget::getVariable $path data
-
- set data(width) 0
-
- eval [list label $path.l] $maps(.l)
-
- if {[string equal [Widget::cget $path -state] "normal"]} {
- set fg [Widget::cget $path -foreground]
- } else {
- set fg [Widget::cget $path -disabledforeground]
- }
-
- set var [Widget::cget $path -textvariable]
- if {$var == ""
- && [Widget::cget $path -image] == ""
- && [Widget::cget $path -bitmap] == ""} {
- set desc [BWidget::getname [Widget::cget $path -name]]
- if {[string length $desc]} {
- set text [lindex $desc 0]
- set under [lindex $desc 1]
- } else {
- set text [Widget::cget $path -text]
- set under [Widget::cget $path -underline]
- }
- } else {
- set under -1
- set text ""
- }
-
- $path.l configure -text $text -underline $under -foreground $fg
-
- set accel [string tolower [string index $text $under]]
- if {[string length $accel]} {
- bind [winfo toplevel $path] <Alt-$accel> [list Label::setfocus $path]
- }
-
- bindtags $path [list BwLabel [winfo toplevel $path] all]
- bindtags $path.l [list $path.l $path Label [winfo toplevel $path] all]
- pack $path.l -expand yes -fill both
-
- set dragendcmd [Widget::cget $path -dragendcmd]
- DragSite::setdrag $path $path.l Label::_init_drag_cmd $dragendcmd 1
- DropSite::setdrop $path $path.l Label::_over_cmd Label::_drop_cmd 1
- DynamicHelp::sethelp $path $path.l 1
-
- if {[string length $var]} {
- upvar #0 $var textvar
- _trace_variable $path
- if {![info exists textvar]} {
- set textvar [Widget::getoption $path -text]
- } else {
- _update_textvariable $path "" "" write
- }
- }
-
- if {[Widget::getoption $path -elide]
- || [Widget::getoption $path -autowrap]} {
- bind $path.l <Configure> [list Label::_redraw $path %w]
- }
-
- return [Widget::create Label $path]
- }
-
-
- proc Label::configure { path args } {
- set oldunder [$path.l cget -underline]
- if {$oldunder != -1} {
- set oldaccel [string index [$path.l cget -text] $oldunder]
- set oldaccel [string tolower $oldaccel]
- } else {
- set oldaccel ""
- }
-
- set oldvar [$path.l cget -textvariable]
-
- set res [Widget::configure $path $args]
-
- set cfg [Widget::hasChanged $path -foreground fg]
- set cdfg [Widget::hasChanged $path -disabledforeground dfg]
- set cst [Widget::hasChanged $path -state state]
-
- if { $cst || $cfg || $cdfg } {
- if { $state == "normal" } {
- $path.l configure -fg $fg
- } else {
- $path.l configure -fg $dfg
- }
- }
-
- set cv [Widget::hasChanged $path -textvariable var]
- set cb [Widget::hasChanged $path -image img]
- set ci [Widget::hasChanged $path -bitmap bmp]
- set cn [Widget::hasChanged $path -name name]
- set ct [Widget::hasChanged $path -text text]
- set cu [Widget::hasChanged $path -underline under]
-
- if { $cv || $cb || $ci || $cn || $ct || $cu } {
- if { $var == "" && $img == "" && $bmp == "" } {
- set desc [BWidget::getname $name]
- if { $desc != "" } {
- set text [lindex $desc 0]
- set under [lindex $desc 1]
- }
- } else {
- set under -1
- set text ""
- }
- set top [winfo toplevel $path]
- if { $oldaccel != "" } {
- bind $top <Alt-$oldaccel> {}
- }
- set accel [string tolower [string index $text $under]]
- if { $accel != "" } {
- bind $top <Alt-$accel> [list Label::setfocus $path]
- }
- $path.l configure -text $text -underline $under -textvariable $var
- }
-
- if {$cv} {
- if {[string length $oldvar]} {
- trace remove variable $oldvar [list write unset] [list Label::_update_textvariable $path]
- }
-
- _trace_variable $path
- }
-
- if {$ct && [Widget::getoption $path -elide]} {
- _redraw $path [winfo width $path]
- }
-
- set force [Widget::hasChanged $path -dragendcmd dragend]
- DragSite::setdrag $path $path.l Label::_init_drag_cmd $dragend $force
- DropSite::setdrop $path $path.l Label::_over_cmd Label::_drop_cmd
- DynamicHelp::sethelp $path $path.l
-
- return $res
- }
-
-
- proc Label::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- proc Label::setfocus { path } {
- if {[string equal [Widget::cget $path -state] "normal"]} {
- set w [Widget::cget $path -focus]
- if { [winfo exists $w] && [Widget::focusOK $w] } {
- focus $w
- }
- }
- }
-
-
- proc Label::_init_drag_cmd { path X Y top } {
- set path [winfo parent $path]
- if {[set cmd [Widget::cget $path -draginitcmd]] != ""} {
- return [uplevel \#0 $cmd [list $path $X $Y $top]]
- }
- if { [set data [$path.l cget -image]] != "" } {
- set type "IMAGE"
- pack [label $top.l -image $data]
- } elseif { [set data [$path.l cget -bitmap]] != "" } {
- set type "BITMAP"
- pack [label $top.l -bitmap $data]
- } else {
- set data [$path.l cget -text]
- set type "TEXT"
- }
- set usertype [Widget::getoption $path -dragtype]
- if { $usertype != "" } {
- set type $usertype
- }
- return [list $type {copy} $data]
- }
-
-
- proc Label::_drop_cmd { path source X Y op type data } {
- set path [winfo parent $path]
- if {[set cmd [Widget::cget $path -dropcmd]] != ""} {
- return [uplevel \#0 $cmd [list $path $source $X $Y $op $type $data]]
- }
- if { $type == "COLOR" || $type == "FGCOLOR" } {
- configure $path -foreground $data
- } elseif { $type == "BGCOLOR" } {
- configure $path -background $data
- } else {
- set text ""
- set image ""
- set bitmap ""
- switch -- $type {
- IMAGE {set image $data}
- BITMAP {set bitmap $data}
- default {
- set text $data
- if { [set var [$path.l cget -textvariable]] != "" } {
- configure $path -image "" -bitmap ""
- BWidget::setglobal $var $data
- return
- }
- }
- }
- configure $path -text $text -image $image -bitmap $bitmap
- }
- return 1
- }
-
-
- proc Label::_over_cmd { path source event X Y op type data } {
- set path [winfo parent $path]
- if { [set cmd [Widget::cget $path -dropovercmd]] != "" } {
- set opts [list $path $source $event $X $Y $op $type $data]
- return [uplevel \#0 $cmd $opts]
- }
- if {[Widget::getoption $path -state] == "normal" ||
- $type == "COLOR" || $type == "FGCOLOR" || $type == "BGCOLOR"} {
- DropSite::setcursor based_arrow_down
- return 1
- }
- DropSite::setcursor dot
- return 0
- }
-
-
- proc Label::_redraw { path width } {
- Widget::getVariable $path data
-
- if {$width == $data(width)} { return }
-
- if {[Widget::getoption $path -autowrap]} {
- set padx [Widget::getoption $path -wrappadx]
- $path.l configure -wraplength [expr {$width - $padx}]
- } elseif {[Widget::getoption $path -elide]} {
- set font [$path.l cget -font]
- set text [Widget::getoption $path -text]
- set side [Widget::getoption $path -elideside]
- set ellipsis [Widget::getoption $path -ellipsis]
-
- set bd [$path.l cget -bd]
- set padx [$path.l cget -padx]
- set epadx [Widget::getoption $path -elidepadx]
- set width [expr {($width - (($bd + $padx) * 2)) - $epadx}]
-
- if {$width > 0} {
- set string $text
- while {[font measure $font $string] > $width} {
- switch -- $side {
- "left" {
- set text [string range $text 1 end]
- set string $ellipsis$text
- }
-
- "right" {
- set text [string range $text 0 end-1]
- set string $text$ellipsis
- }
-
- "center" {
- set x [expr {[string length $text] / 2}]
- set l [string range $text 0 $x]
- set r [string range $text [incr x 2] end]
- set text $l$r
- set string $l$ellipsis$r
- }
- }
-
- if {![string length $text]} { break }
- }
-
- $path.l configure -text $string
- }
- }
-
- set data(width) [winfo reqwidth $path.l]
- }
-
-
- proc Label::_trace_variable { path } {
- set varName [Widget::getoption $path -textvariable]
-
- if {[string length $varName]} {
- set ops [list write unset]
- set command [list Label::_update_textvariable $path]
-
- uplevel #0 [list trace add variable $varName $ops $command]
- }
- }
-
-
- proc Label::_update_textvariable { path name1 name2 op } {
- set varName [Widget::getoption $path -textvariable]
- upvar #0 $varName var
-
- switch -- $op {
- "write" {
- Widget::setoption $path -text $var
-
- $path.l configure -text $var
-
- _redraw $path [winfo width $path]
- }
-
- "unset" {
- set var [Widget::getoption $path -text]
- _trace_variable $path
- }
- }
- }
-
-
- proc Label::_destroy { path } {
- set ops [list write unset]
- set cmd [list Label::_update_textvariable $path]
- set varName [Widget::getoption $path -textvariable]
-
- uplevel #0 [list trace remove variable $varName $ops $cmd]
-
- Widget::destroy $path
- }
-
-
- namespace eval Tree {
- Widget::define Tree tree DragSite DropSite DynamicHelp
-
- namespace eval Node {
- Widget::declare Tree::Node {
- {-text String "" 0}
- {-font String "" 0}
- {-image String "" 0}
- {-window String "" 0}
- {-fill Color "SystemButtonText" 0}
- {-data String "" 0}
- {-open Boolean 0 0}
- {-selectable Boolean 1 0}
- {-drawcross Enum auto 0 {auto allways never}}
- {-padx Int -1 0 "%d >= -1"}
- {-deltax Int -1 0 "%d >= -1"}
- {-anchor String "w" 0 ""}
- }
- }
-
- DynamicHelp::include Tree::Node balloon
-
- Widget::tkinclude Tree canvas .c remove {
- -insertwidth -insertbackground -insertborderwidth -insertofftime
- -insertontime -selectborderwidth -closeenough -confine -scrollregion
- -xscrollincrement -yscrollincrement -width -height
- } initialize {
- -background white -relief sunken -borderwidth 2
- -takefocus 1 -highlightthickness 1 -width 200
- }
-
- DragSite::include Tree "TREE_NODE" 1
- DropSite::include Tree {
- TREE_NODE {copy {} move {}}
- }
-
- Widget::declare Tree {
- {-deltax Int 10 0 "%d >= 0"}
- {-deltay Int 15 0 "%d >= 0"}
- {-padx Int 20 0 "%d >= 0"}
- {-font String "TkTextFont" 0}
- {-background Color "SystemWindow" 0}
- {-selectbackground Color "SystemHighlight" 0}
- {-selectforeground Color "SystemHighlightText" 0}
- {-selectcommand String "" 0}
- {-width TkResource "" 0 listbox}
- {-height TkResource "" 0 listbox}
- {-selectfill Boolean 0 0}
- {-showlines Boolean 1 0}
- {-linesfill Color "SystemButtonText" 0}
- {-linestipple TkResource "" 0 {label -bitmap}}
- {-crossfill Color "SystemButtonText" 0}
- {-redraw Boolean 1 0}
- {-opencmd String "" 0}
- {-closecmd String "" 0}
- {-dropovermode Flag "wpn" 0 "wpn"}
- {-dropcmd String "Tree::_drag_and_drop" 0}
-
- {-crossopenimage String "" 0}
- {-crosscloseimage String "" 0}
- {-crossopenbitmap String "" 0}
- {-crossclosebitmap String "" 0}
-
- {-bg Synonym -background}
- }
-
- Widget::addmap Tree "" .c { -deltay -yscrollincrement }
-
- bind Tree <FocusIn> [list after idle {BWidget::refocus %W %W.c}]
- bind Tree <Destroy> [list Tree::_destroy %W]
- bind Tree <Configure> [list Tree::_update_scrollregion %W]
-
- bind TreeSentinalStart <Button-1> {
- if {$::Tree::sentinal(%W)} {
- set ::Tree::sentinal(%W) 0
- break
- }
- }
-
- bind TreeSentinalEnd <Button-1> {
- set ::Tree::sentinal(%W) 0
- }
-
- bind TreeFocus <Button-1> [list focus %W]
-
- BWidget::bindMouseWheel TreeCanvas
-
- variable _edit
- set _edit(editing) 0
- }
-
-
- proc Tree::create { path args } {
- Widget::initArgs Tree $args maps
-
- eval [list frame $path -class Tree] $maps(:cmd)
-
- if {[info tclversion] > 8.3} { $path configure -padx 0 -pady 0 }
-
- Widget::initFromODB Tree $path $maps(Tree)
-
- set ::Tree::sentinal($path.c) 0
-
- Widget::getVariable $path data
-
- set data(root) [list [list]]
- set data(selnodes) [list]
- set data(upd,level) 0
- set data(upd,nodes) [list]
- set data(upd,afterid) ""
- set data(dnd,scroll) ""
- set data(dnd,afterid) ""
- set data(dnd,selnodes) [list]
- set data(dnd,node) ""
-
- Widget::getVariable $path items
-
- eval [list canvas $path.c] $maps(.c) -xscrollincrement 8
- bindtags $path.c [list TreeSentinalStart TreeFocus $path.c Canvas TreeCanvas [winfo toplevel $path] all TreeSentinalEnd]
- pack $path.c -expand yes -fill both
- $path.c bind cross <ButtonPress-1> [list Tree::_cross_event $path]
-
- bind $path.c <KeyPress-Up> [list Tree::_keynav up $path]
- bind $path.c <KeyPress-Down> [list Tree::_keynav down $path]
- bind $path.c <KeyPress-Right> [list Tree::_keynav right $path]
- bind $path.c <KeyPress-Left> [list Tree::_keynav left $path]
- bind $path.c <KeyPress-space> [list +Tree::_keynav space $path]
-
- bind $path.c <Control-KeyPress-Up> [list $path.c yview scroll -1 units]
- bind $path.c <Control-KeyPress-Down> [list $path.c yview scroll 1 units]
- bind $path.c <Control-KeyPress-Left> [list $path.c xview scroll -1 units]
- bind $path.c <Control-KeyPress-Right> [list $path.c xview scroll 1 units]
-
- DragSite::setdrag $path $path.c Tree::_init_drag_cmd [Widget::cget $path -dragendcmd] 1
- DropSite::setdrop $path $path.c Tree::_over_cmd Tree::_drop_cmd 1
-
- Widget::create Tree $path
-
- set w [Widget::cget $path -width]
- set h [Widget::cget $path -height]
- set dy [Widget::cget $path -deltay]
- $path.c configure -width [expr {$w*8}] -height [expr {$h*$dy}]
-
-
- set selectcmd Tree::_mouse_select
- Tree::bindText $path <Button-1> [list $selectcmd $path set]
- Tree::bindImage $path <Button-1> [list $selectcmd $path set]
- Tree::bindText $path <Control-Button-1> [list $selectcmd $path toggle]
- Tree::bindImage $path <Control-Button-1> [list $selectcmd $path toggle]
-
- $path.c bind TreeItemSentinal <Double-Button-1> [list set ::Tree::sentinal($path.c) 1]
-
- return $path
- }
-
-
- proc Tree::configure { path args } {
- Widget::getVariable $path data
-
- set res [Widget::configure $path $args]
-
- set ch1 [expr {[Widget::hasChanged $path -deltax val]
- || [Widget::hasChanged $path -deltay dy]
- || [Widget::hasChanged $path -padx val]
- || [Widget::hasChanged $path -showlines val]
- || [Widget::hasChanged $path -font font]}]
-
- set ch2 [expr {[Widget::hasChanged $path -selectbackground val] |
- [Widget::hasChanged $path -selectforeground val]}]
-
- if {[Widget::hasChanged $path -linesfill fill]
- || [Widget::hasChanged $path -linestipple stipple] } {
- $path.c itemconfigure line -fill $fill -stipple $stipple
- }
-
- if {[Widget::hasChanged $path -crossfill fill]} {
- $path.c itemconfigure cross -foreground $fill
- }
-
- if {[Widget::hasChanged $path -selectfill fill]} {
- if {$fill} {
- foreach event [$path.c bind "node"] {
- $path.c bind "box" $event [$path.c bind "node" $event]
- }
- } else {
- foreach event [$path.c bind "node"] {
- $path.c bind "box" $event {}
- }
- }
- }
-
- if { $ch1 } {
- _redraw_idle $path 3
- } elseif { $ch2 } {
- _redraw_idle $path 1
- }
-
- if { [Widget::hasChanged $path -height h] } {
- $path.c configure -height [expr {$h*$dy}]
- }
- if { [Widget::hasChanged $path -width w] } {
- $path.c configure -width [expr {$w*8}]
- }
-
- if { [Widget::hasChanged $path -redraw bool] && $bool } {
- set upd $data(upd,level)
- set data(upd,level) 0
- _redraw_idle $path $upd
- }
-
- set force [Widget::hasChanged $path -dragendcmd dragend]
- DragSite::setdrag $path $path.c Tree::_init_drag_cmd $dragend $force
- DropSite::setdrop $path $path.c Tree::_over_cmd Tree::_drop_cmd
-
- return $res
- }
-
-
- proc Tree::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- proc Tree::insert { path index parent node args } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- set node [Widget::nextIndex $path $node]
-
- if {[info exists data($node)]} {
- return -code error "node \"$node\" already exists"
- }
-
- if {![info exists data($parent)]} {
- return -code error "node \"$parent\" does not exist"
- }
-
- Widget::init Tree::Node $path.$node $args
-
- if {[string equal $index "end"]} {
- lappend data($parent) $node
- } else {
- set data($parent) [linsert $data($parent) [incr index] $node]
- }
- set data($node) [list $parent]
-
- if {[string equal $parent "root"]} {
- _redraw_idle $path 3
- } elseif {[Tree::visible $path $parent]} {
- if {[Widget::getoption $path.$parent -open]} {
- _redraw_idle $path 3
- } else {
- lappend data(upd,nodes) $parent 8
- _redraw_idle $path 2
- }
- }
-
- return $node
- }
-
-
- proc Tree::itemconfigure { path node args } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if {[string equal $node "root"] || ![info exists data($node)]} {
- return -code error "node \"$node\" does not exist"
- }
-
- set result [Widget::configure $path.$node $args]
-
- _set_help $path $node
-
- if { [visible $path $node] } {
- set lopt {}
- set flag 0
- foreach opt {-window -image -drawcross -font -text -fill} {
- set flag [expr {$flag << 1}]
- if {[Widget::hasChanged $path.$node $opt val]} {
- set flag [expr {$flag | 1}]
- }
- }
-
- if {[Widget::hasChanged $path.$node -open val]} {
- if {[llength $data($node)] > 1} {
- _redraw_idle $path 3
- } else {
- set flag [expr {$flag | 8}]
- }
- }
-
- if {$data(upd,level) < 3 && [Widget::hasChanged $path.$node -padx x]} {
- _redraw_idle $path 3
- }
-
- if { $data(upd,level) < 3 && $flag } {
- if { [set idx [lsearch -exact $data(upd,nodes) $node]] == -1 } {
- lappend data(upd,nodes) $node $flag
- } else {
- incr idx
- set flag [expr {[lindex $data(upd,nodes) $idx] | $flag}]
- set data(upd,nodes) [lreplace $data(upd,nodes) $idx $idx $flag]
- }
- _redraw_idle $path 2
- }
- }
- return $result
- }
-
-
- proc Tree::itemcget { path node option } {
- Widget::getVariable $path data
- set node [_node_name $path $node]
- if {[string equal $node "root"] || ![info exists data($node)]} {
- return -code error "node \"$node\" does not exist"
- }
-
- return [Widget::cget $path.$node $option]
- }
-
-
- proc Tree::bindText { path event script } {
- if {[string length $script]} {
- append script " \[Tree::_get_node_name [list $path] current 2\]"
- }
- $path.c bind "node" $event $script
- if {[Widget::getoption $path -selectfill]} {
- $path.c bind "box" $event $script
- } else {
- $path.c bind "box" $event {}
- }
- }
-
-
- proc Tree::bindImage { path event script } {
- if {[string length $script]} {
- append script " \[Tree::_get_node_name [list $path] current 2\]"
- }
- $path.c bind "img" $event $script
- if {[Widget::getoption $path -selectfill]} {
- $path.c bind "box" $event $script
- } else {
- $path.c bind "box" $event {}
- }
- }
-
-
- proc Tree::bindTree { path args } {
- return [eval [list bind $path.c] $args]
- }
-
-
- proc Tree::delete { path args } {
- Widget::getVariable $path data
-
- foreach lnodes $args {
- foreach node $lnodes {
- set node [_node_name $path $node]
- if { ![string equal $node "root"] && [info exists data($node)] } {
- set parent [lindex $data($node) 0]
- set idx [lsearch -exact $data($parent) $node]
- set data($parent) [lreplace $data($parent) $idx $idx]
- _subdelete $path [list $node]
- }
- }
- }
-
- _redraw_idle $path 3
- }
-
-
- proc Tree::move { path parent node index } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if { [string equal $node "root"] || ![info exists data($node)] } {
- return -code error "node \"$node\" does not exist"
- }
- if { ![info exists data($parent)] } {
- return -code error "node \"$parent\" does not exist"
- }
- set p $parent
- while {![string equal $p "root"]} {
- if {[string equal $p $node]} {
- return -code error "node \"$parent\" is a descendant of \"$node\""
- }
- set p [Tree::parent $path $p]
- }
-
- set oldp [lindex $data($node) 0]
- set idx [lsearch -exact $data($oldp) $node]
- set data($oldp) [lreplace $data($oldp) $idx $idx]
- set data($node) [concat [list $parent] [lrange $data($node) 1 end]]
-
- if {[string equal $index "end"]} {
- lappend data($parent) $node
- } else {
- set data($parent) [linsert $data($parent) [incr index] $node]
- }
-
- if {([string equal $oldp "root"] ||
- ([visible $path $oldp] && [Widget::getoption $path.$oldp -open]))
- || ([string equal $parent "root"] ||
- ([visible $path $parent]
- && [Widget::getoption $path.$parent -open]))} {
- _redraw_idle $path 3
- }
- }
-
-
- proc Tree::reorder { path node neworder } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if { ![info exists data($node)] } {
- return -code error "node \"$node\" does not exist"
- }
- set children [lrange $data($node) 1 end]
- if { [llength $children] } {
- set children [BWidget::lreorder $children $neworder]
- set data($node) [linsert $children 0 [lindex $data($node) 0]]
- if { [visible $path $node] && [Widget::getoption $path.$node -open] } {
- _redraw_idle $path 3
- }
- }
- }
-
-
- proc Tree::selection { path cmd args } {
- Widget::getVariable $path data
-
- switch -- $cmd {
- toggle {
- foreach node $args {
- set node [_node_name $path $node]
- if {![info exists data($node)]} {
- return -code error "$path selection toggle:
- Cannot toggle unknown node \"$node\"."
- }
- }
-
- foreach node $args {
- set node [_node_name $path $node]
- if {[set idx [lsearch -exact $data(selnodes) $node]] != -1} {
- set data(selnodes) [lreplace $data(selnodes) $idx $idx]
- } else {
- lappend data(selnodes) $node
- }
- }
- }
-
- set {
- foreach node $args {
- set node [_node_name $path $node]
- if {![info exists data($node)]} {
- return -code error "$path selection set: Cannot select unknown node \"$node\"."
- }
- }
- set data(selnodes) {}
- foreach node $args {
- set node [_node_name $path $node]
- if { [Widget::getoption $path.$node -selectable] } {
- if { [lsearch -exact $data(selnodes) $node] == -1 } {
- lappend data(selnodes) $node
- }
- }
- }
- _call_selectcmd $path
- }
-
- add {
- foreach node $args {
- set node [_node_name $path $node]
- if {![info exists data($node)]} {
- return -code error "$path selection add: Cannot select unknown node \"$node\"."
- }
- }
-
- foreach node $args {
- set node [_node_name $path $node]
- if {[Widget::getoption $path.$node -selectable]} {
- if {[lsearch -exact $data(selnodes) $node] == -1} {
- lappend data(selnodes) $node
- }
- }
- }
- _call_selectcmd $path
- }
-
- range {
-
- if {[llength $args] != 2} {
- return -code error [BWidget::wrongNumArgsString "$path selection range node1 node2"]
- }
-
- foreach {node1 node2} $args break
-
- set node1 [_node_name $path $node1]
- set node2 [_node_name $path $node2]
- if {![info exists data($node1)]} {
- return -code error "$path selection range: Cannot start range at unknown node \"$node1\"."
- }
- if {![info exists data($node2)]} {
- return -code error "$path selection range: Cannot end range at unknown node \"$node2\"."
- }
-
- set nodes {}
- foreach nodeItem [$path.c find withtag node] {
- set node [Tree::_get_node_name $path $nodeItem 2]
- if { [Widget::getoption $path.$node -selectable] } {
- lappend nodes $node
- }
- }
-
- if {$node1 == "root"} {
- set node1 [lindex $nodes 0]
- }
-
- if {$node2 == "root"} {
- set node2 [lindex $nodes 0]
- }
-
- while {[set index1 [lsearch -exact $nodes $node1]] == -1} {
- set node1 [lindex $data($node1) 0]
- }
-
- while {[set index2 [lsearch -exact $nodes $node2]] == -1} {
- set node2 [lindex $data($node2) 0]
- }
-
- if {$index2 < $index1} {
- incr index1 $index2
- set index2 [expr {$index1 - $index2}]
- set index1 [expr {$index1 - $index2}]
- }
-
- set data(selnodes) [lrange $nodes $index1 $index2]
- _call_selectcmd $path
- }
-
- remove {
- foreach node $args {
- set node [_node_name $path $node]
- if { [set idx [lsearch -exact $data(selnodes) $node]] != -1 } {
- set data(selnodes) [lreplace $data(selnodes) $idx $idx]
- }
- }
- _call_selectcmd $path
- }
-
- clear {
- if {[llength $args] != 0} {
- return -code error [BWidget::wrongNumArgsString "$path selection clear"]
- }
- set data(selnodes) {}
- _call_selectcmd $path
- }
-
- get {
- if {[llength $args] != 0} {
- return -code error [BWidget::wrongNumArgsString "$path selection get"]
- }
- return $data(selnodes)
- }
-
- includes {
- if {[llength $args] != 1} {
- return -code error [BWidget::wrongNumArgsString "$path selection includes node"]
- }
- set node [lindex $args 0]
- set node [_node_name $path $node]
- return [expr {[lsearch -exact $data(selnodes) $node] != -1}]
- }
-
- default {
- return
- }
- }
-
- _redraw_idle $path 1
- }
-
-
- proc Tree::getcanvas { path } {
- return $path.c
- }
-
-
- proc Tree::exists { path node } {
- Widget::getVariable $path data
- set node [_node_name $path $node]
- return [info exists data($node)]
- }
-
-
- proc Tree::visible { path node } {
- Widget::getVariable $path items
- set node [_node_name $path $node]
- return [info exists items($node)]
- }
-
-
- proc Tree::parent { path node } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if {![info exists data($node)]} {
- return -code error "node \"$node\" does not exist"
- }
- return [lindex $data($node) 0]
- }
-
-
- proc Tree::index { path node } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if {[string equal $node "root"] || ![info exists data($node)]} {
- return -code error "node \"$node\" does not exist"
- }
- set parent [lindex $data($node) 0]
- return [expr {[lsearch -exact $data($parent) $node] - 1}]
- }
-
-
- proc Tree::find { path findInfo {confine ""} } {
- if {[regexp -- {^@([0-9]+),([0-9]+)$} $findInfo match x y]} {
- set x [$path.c canvasx $x]
- set y [$path.c canvasy $y]
- } elseif {[regexp -- {^[0-9]+$} $findInfo lineNumber]} {
- set dy [Widget::cget $path -deltay]
- set y [expr {$dy*($lineNumber+0.5)}]
- set confine ""
- } else {
- return -code error "invalid find spec \"$findInfo\""
- }
-
- set found 0
- set region [$path.c bbox all]
- if {[llength $region]} {
- set xi [lindex $region 0]
- set xs [lindex $region 2]
- foreach id [$path.c find overlapping $xi $y $xs $y] {
- set ltags [$path.c gettags $id]
- set item [lindex $ltags 1]
- if { [string equal $item "node"] ||
- [string equal $item "img"] ||
- [string equal $item "win"] } {
- set node [Tree::_get_node_name $path $id 2]
- set found 1
- break
- }
- }
- }
-
- if {$found} {
- if {[string equal $confine "confine"]} {
- set padx [_get_node_padx $path $node]
- set xi [expr {[lindex [$path.c coords n:$node] 0] - $padx}]
- set xs [lindex [$path.c bbox n:$node] 2]
- if {$x >= $xi && $x <= $xs} {
- return $node
- }
- } else {
- return $node
- }
- }
-
- return
- }
-
-
- proc Tree::line { path node } {
- Widget::getVariable $path items
- set node [_node_name $path $node]
- set line [lindex $items($node) 0]
- if {[string length $line]} { return $line }
- return -1
- }
-
-
- proc Tree::nodes { path node {first ""} {last ""} } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if {![info exists data($node)]} {
- return -code error "node \"$node\" does not exist"
- }
-
- if {![string length $first]} {
- return [lrange $data($node) 1 end]
- }
-
- if {![string length $last]} {
- return [lindex [lrange $data($node) 1 end] $first]
- } else {
- return [lrange [lrange $data($node) 1 end] $first $last]
- }
- }
-
-
-
- proc Tree::visiblenodes { path {node root} } {
- Widget::getVariable $path data
-
- set nodes [list]
- foreach node [lrange $data($node) 1 end] {
- lappend nodes $node
- if {[Widget::getoption $path.$node -open]} {
- eval lappend nodes [Tree::visiblenodes $path $node]
- }
- }
-
- return $nodes
- }
-
- proc Tree::see { path node } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- set node [_node_name $path $node]
- if {[Widget::getoption $path -redraw] && $data(upd,afterid) != ""} {
- after cancel $data(upd,afterid)
- _redraw_tree $path
- }
-
- if {[info exists items($node)]} {
- Tree::_see $path [lindex $items($node) 1]
- }
- }
-
-
- proc Tree::opentree { path node {recursive 1} } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if {[string equal $node "root"] || ![info exists data($node)]} {
- return -code error "node \"$node\" does not exist"
- }
-
- _recexpand $path $node 1 $recursive [Widget::getoption $path -opencmd]
- _redraw_idle $path 3
- }
-
-
- proc Tree::closetree { path node {recursive 1} } {
- Widget::getVariable $path data
-
- set node [_node_name $path $node]
- if {[string equal $node "root"] || ![info exists data($node)]} {
- return -code error "node \"$node\" does not exist"
- }
-
- _recexpand $path $node 0 $recursive [Widget::getoption $path -closecmd]
- _redraw_idle $path 3
- }
-
-
- proc Tree::toggle { path node } {
- if {[Tree::itemcget $path $node -open]} {
- $path closetree $node 0
- } else {
- $path opentree $node 0
- }
- }
-
-
- proc Tree::edit { path node text {verifycmd ""} {clickres 0} {select 1} } {
- variable _edit
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- set node [_node_name $path $node]
- if {[Widget::getoption $path -redraw] && $data(upd,afterid) != ""} {
- after cancel $data(upd,afterid)
- _redraw_tree $path
- }
-
- if {[info exists items($node)]} {
- set _edit(editing) 1
-
- set idn [lindex $items($node) 1]
-
- Tree::_see $path $idn
-
- set oldfg [$path.c itemcget $idn -fill]
- set sbg [Widget::cget $path -selectbackground]
- set coords [$path.c coords $idn]
- set x [lindex $coords 0]
- set y [lindex $coords 1]
- set ht [$path.c cget -highlightthickness]
- set bd [expr {[$path.c cget -borderwidth] + $ht}]
- set w [expr {[winfo width $path] - 2 * $bd}]
- set wmax [expr {[$path.c canvasx $w] - $x}]
-
- set _edit(wait) 0
- set _edit(path) $path
- set _edit(node) $node
- set _edit(text) $text
-
- $path.c itemconfigure $idn -fill [Widget::cget $path -background]
- $path.c itemconfigure s:$node -fill {} -outline {}
-
- set frame [frame $path.edit -relief flat -borderwidth 0 -highlightthickness 0 -background [Widget::cget $path -background]]
- set ent [entry $frame.edit -width 0 -relief solid -borderwidth 1 -highlightthickness 0 -foreground [Widget::getoption $path.$node -fill] -background [Widget::cget $path -background] -selectforeground [Widget::cget $path -selectforeground] -selectbackground $sbg -font [_get_option $path $node -font] -textvariable Tree::_edit(text)]
- pack $ent -ipadx 8 -anchor w
-
- set _edit(frame) $frame
- set _edit(entry) $ent
-
- set idw [$path.c create window $x $y -window $frame -anchor w]
- trace variable Tree::_edit(text) w [list Tree::_update_edit_size $path $ent $idw $wmax]
- tkwait visibility $ent
- grab $frame
- BWidget::focus set $ent
-
- _update_edit_size $path $ent $idw $wmax
- update
-
- if {$select} {
- $ent selection range 0 end
- $ent icursor end
- $ent xview end
- }
-
- bindtags $ent [list $ent Entry]
- bind $ent <Escape> {set Tree::_edit(wait) 0}
- bind $ent <Return> {set Tree::_edit(wait) 1}
- if {$clickres == 0 || $clickres == 1} {
- bind $frame <Button> [list set Tree::_edit(wait) $clickres]
- }
-
- set ok 0
- while {!$ok} {
- focus -force $ent
- tkwait variable Tree::_edit(wait)
- if {!$_edit(wait) || ![llength $verifycmd] ||
- [uplevel \#0 $verifycmd [list $_edit(text)]]} {
- set ok 1
- }
- }
-
- trace vdelete Tree::_edit(text) w [list Tree::_update_edit_size $path $ent $idw $wmax]
- grab release $frame
- BWidget::focus release $ent
-
- set _edit(editing) 0
-
- destroy $frame
- $path.c delete $idw
- $path.c itemconfigure $idn -fill $oldfg
- $path.c itemconfigure s:$node -fill $sbg -outline $sbg
-
- if {$_edit(wait)} {
- return $_edit(text)
- }
- }
- }
-
-
- proc Tree::editing { path } {
- variable _edit
- if {$_edit(editing) && $_edit(path) eq $path} { return 1 }
- return 0
- }
-
-
- proc Tree::xview { path args } {
- return [eval [linsert $args 0 $path.c xview]]
- }
-
-
- proc Tree::yview { path args } {
- return [eval [linsert $args 0 $path.c yview]]
- }
-
-
- proc Tree::search { path args } {
- Widget::getVariable $path data
-
- array set _args {
- -pattern *
- }
- array set _args $args
-
- return [array names data $_args(-pattern)]
- }
-
-
- proc Tree::level { path node } {
- Widget::getVariable $path data
-
- if {[string equal $node "root"]} { return 0 }
-
- if {![info exists data($node)]} {
- return -code error "node \"$node\" does not exists"
- }
-
- set level 1
- set parent [lindex $data($node) 0]
- while {![string equal $parent "root"]} {
- incr level
- set parent [lindex $data($parent) 0]
- }
-
- return $level
- }
-
-
- proc Tree::_call_selectcmd { path } {
- Widget::getVariable $path data
-
- set selectcmd [Widget::getoption $path -selectcommand]
- if {[llength $selectcmd]} {
- lappend selectcmd $path
- lappend selectcmd $data(selnodes)
- uplevel \#0 $selectcmd
- }
- return
- }
-
-
- proc Tree::_update_edit_size { path entry idw wmax args } {
- set entw [winfo reqwidth $entry]
- if {$entw + 8 >= $wmax} {
- $path.c itemconfigure $idw -width $wmax
- } else {
- $path.c itemconfigure $idw -width 0
- }
- }
-
-
- proc Tree::_see { path idn } {
- set bbox [$path.c bbox $idn]
- set scrl [$path.c cget -scrollregion]
-
- set ymax [lindex $scrl 3]
- set dy [$path.c cget -yscrollincrement]
- set yv [$path yview]
- set yv0 [expr {round([lindex $yv 0]*$ymax/$dy)}]
- set yv1 [expr {round([lindex $yv 1]*$ymax/$dy)}]
- set y [expr {int([lindex [$path.c coords $idn] 1]/$dy)}]
-
- if {$y < $yv0} {
- $path.c yview scroll [expr {$y-$yv0}] units
- } elseif { $y >= $yv1 } {
- $path.c yview scroll [expr {$y-$yv1+1}] units
- }
-
- set xmax [lindex $scrl 2]
- set dx [$path.c cget -xscrollincrement]
- set xv [$path xview]
- set x0 [expr {int([lindex $bbox 0]/$dx)}]
- set xv0 [expr {round([lindex $xv 0]*$xmax/$dx)}]
- set xv1 [expr {round([lindex $xv 1]*$xmax/$dx)}]
-
- if {$x0 >= $xv1 || $x0 < $xv0} {
- $path.c xview scroll [expr {$x0-$xv0}] units
- }
- }
-
-
- proc Tree::_recexpand { path node expand recursive cmd } {
- Widget::getVariable $path data
-
- if {[Widget::getoption $path.$node -open] != $expand} {
- Widget::setoption $path.$node -open $expand
- if {[llength $cmd]} {
- uplevel \#0 $cmd [list $node]
- }
- }
-
- if {$recursive} {
- foreach subnode [lrange $data($node) 1 end] {
- _recexpand $path $subnode $expand $recursive $cmd
- }
- }
- }
-
-
- proc Tree::_subdelete { path lnodes } {
- Widget::getVariable $path data
-
- set sel $data(selnodes)
-
- while {[llength $lnodes]} {
- set lsubnodes [list]
- foreach node $lnodes {
- foreach subnode [lrange $data($node) 1 end] {
- lappend lsubnodes $subnode
- }
- unset data($node)
- set idx [lsearch -exact $sel $node]
- if {$idx >= 0} {
- set sel [lreplace $sel $idx $idx]
- }
- if {[set win [Widget::getoption $path.$node -window]] != ""} {
- destroy $win
- }
- Widget::destroy $path.$node 0
- }
- set lnodes $lsubnodes
- }
-
- set data(selnodes) $sel
- }
-
-
- proc Tree::_update_scrollregion { path } {
- set bd [$path.c cget -borderwidth]
- set ht [$path.c cget -highlightthickness]
- set bd [expr {2 * ($bd + $ht)}]
- set w [expr {[winfo width $path] - $bd}]
- set h [expr {[winfo height $path] - $bd}]
- set xinc [$path.c cget -xscrollincrement]
- set yinc [$path.c cget -yscrollincrement]
- set bbox [$path.c bbox node]
- if {[llength $bbox]} {
- set xs [lindex $bbox 2]
- set ys [lindex $bbox 3]
-
- if {$w < $xs} {
- set w [expr {int($xs)}]
- if {[set r [expr {$w % $xinc}]]} {
- set w [expr {$w+$xinc-$r}]
- }
- }
- if {$h < $ys} {
- set h [expr {int($ys)}]
- if {[set r [expr {$h % $yinc}]]} {
- set h [expr {$h+$yinc-$r}]
- }
- }
- }
-
- $path.c configure -scrollregion [list 0 0 $w $h]
-
- if {[Widget::getoption $path -selectfill]} {
- _redraw_selection $path
- }
- }
-
-
- proc Tree::_cross_event { path } {
- Widget::getVariable $path data
-
- set node [Tree::_get_node_name $path current 1]
- if {[Widget::getoption $path.$node -open]} {
- Tree::itemconfigure $path $node -open 0
- if {[llength [set cmd [Widget::getoption $path -closecmd]]]} {
- uplevel \#0 $cmd [list $node]
- }
- } else {
- Tree::itemconfigure $path $node -open 1
- if {[llength [set cmd [Widget::getoption $path -opencmd]]]} {
- uplevel \#0 $cmd [list $node]
- }
- }
- }
-
-
- proc Tree::_draw_cross { path node open x y } {
- Widget::getVariable $path items
- set idc [lindex $items($node) 2]
-
- if {$open} {
- set img [Widget::cget $path -crossopenimage]
- set bmp [Widget::cget $path -crossopenbitmap]
- } else {
- set img [Widget::cget $path -crosscloseimage]
- set bmp [Widget::cget $path -crossclosebitmap]
- }
-
- if {[string length $idc]} {
- if {![string length $img]} {
- $path.c itemconfigure $idc -bitmap $bmp
- } else {
- $path.c itemconfigure $idc -image $img
- }
- return $idc
- }
-
- if {![Widget::getoption $path -showlines]} { set x [expr {$x + 6}] }
-
- if {![string length $img]} {
- set idc [$path.c create bitmap $x $y -bitmap $bmp -background [$path.c cget -background] -foreground [Widget::getoption $path -crossfill] -tags [list cross c:$node] -anchor c]
- } else {
- set idc [$path.c create image $x $y -image $img -tags [list cross c:$node] -anchor c]
- }
-
- return $idc
- }
-
-
- proc Tree::_draw_node { path node x0 y0 deltax deltay padx showlines } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- set x1 [expr {$x0+$deltax+5}]
- set y1 $y0
- if {$showlines} {
- set i [$path.c create line $x0 $y0 $x1 $y0 -fill [Widget::getoption $path -linesfill] -stipple [Widget::getoption $path -linestipple] -tags line]
-
- lappend items($node) $i
- } else {
- lappend items($node) ""
- }
-
- set i [$path.c create text [expr {$x1+$padx}] $y0 -anchor w -text [Widget::getoption $path.$node -text] -fill [Widget::getoption $path.$node -fill] -font [_get_option $path $node -font] -tags [Tree::_get_node_tags $path $node [list node n:$node]]]
- lappend items($node) $i
-
- set len [expr {[llength $data($node)] > 1}]
- set dc [Widget::getoption $path.$node -drawcross]
- set exp [Widget::getoption $path.$node -open]
-
- if {$len && $exp} {
- set y1 [_draw_subnodes $path [lrange $data($node) 1 end] [expr {$x0+$deltax}] $y0 $deltax $deltay $padx $showlines]
- }
-
- if {![string equal $dc "never"] && ($len || [string equal $dc "allways"])} {
- lappend items($node) [_draw_cross $path $node $exp $x0 $y0]
- } else {
- lappend items($node) ""
- }
-
- if {[set win [Widget::getoption $path.$node -window]] != ""} {
- set a [Widget::cget $path.$node -anchor]
- set i [$path.c create window $x1 $y0 -window $win -anchor $a -tags [Tree::_get_node_tags $path $node [list win i:$node]]]
- lappend items($node) $i
- } elseif {[set img [Widget::getoption $path.$node -image]] != ""} {
- set a [Widget::cget $path.$node -anchor]
- set i [$path.c create image $x1 $y0 -image $img -anchor $a -tags [Tree::_get_node_tags $path $node [list img i:$node]]]
- lappend items($node) $i
- } else {
- lappend items($node) ""
- }
-
- set nid [lindex $items($node) 1]
- set iid [lindex $items($node) 3]
- set box [$path.c bbox $nid $iid]
- set id [$path.c create rect 0 [lindex $box 1] [winfo screenwidth $path] [lindex $box 3] -tags [Tree::_get_node_tags $path $node [list box b:$node]] -fill {} -outline {}]
- $path.c lower $id
- lappend items($node) $id
-
- _set_help $path $node
-
- return $y1
- }
-
-
- proc Tree::_draw_subnodes { path nodes x0 y0 deltax deltay padx showlines } {
- set y1 $y0
- foreach node $nodes {
- set padx [_get_node_padx $path $node]
- set deltax [_get_node_deltax $path $node]
- set yp $y1
- set y1 [_draw_node $path $node $x0 [expr {$y1+$deltay}] $deltax $deltay $padx $showlines]
- }
- if {$showlines && [llength $nodes]} {
- if {$y0 < 0} {
- incr y0 $deltay
- }
- set id [$path.c create line $x0 $y0 $x0 [expr {$yp+$deltay}] -fill [Widget::getoption $path -linesfill] -stipple [Widget::getoption $path -linestipple] -tags line]
-
- $path.c lower $id
- }
- return $y1
- }
-
-
- proc Tree::_update_nodes { path } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- foreach {node flag} $data(upd,nodes) {
- if {![info exists items($node)]} { continue }
- set idn [lindex $items($node) 1]
-
- set padx [_get_node_padx $path $node]
- set deltax [_get_node_deltax $path $node]
- set c [$path.c coords $idn]
- set x1 [expr {[lindex $c 0]-$padx}]
- set x0 [expr {$x1-$deltax-5}]
- set y0 [lindex $c 1]
- if {$flag & 48} {
- set win [Widget::getoption $path.$node -window]
- set img [Widget::getoption $path.$node -image]
- set anc [Widget::cget $path.$node -anchor]
- set idi [lindex $items($node) 3]
- set type [lindex [$path.c gettags $idi] 1]
- if {[string length $win]} {
- if {[string equal $type "win"]} {
- $path.c itemconfigure $idi -window $win
- } else {
- $path.c delete $idi
- set tags [_get_node_tags $path $node [list win i:$node]]
- set idi [$path.c create window $x1 $y0 -window $win -anchor $anc -tags $tags]
- set items($node) [lreplace $items($node) 3 3 $idi]
- }
- } elseif {[string length $img]} {
- if {[string equal $type "img"]} {
- $path.c itemconfigure $idi -image $img
- } else {
- $path.c delete $idi
- set tags [_get_node_tags $path $node [list win i:$node]]
- set idi [$path.c create image $x1 $y0 -image $img -anchor $anc -tags $tags]
- set items($node) [lreplace $items($node) 3 3 $idi]
- }
- } else {
- $path.c delete $idi
- set items($node) [lreplace $items($node) 3 3 ""]
- }
- }
-
- if {$flag & 8} {
- set len [expr {[llength $data($node)] > 1}]
- set dc [Widget::getoption $path.$node -drawcross]
- set exp [Widget::getoption $path.$node -open]
-
- if {![string equal $dc "never"]
- && ($len || [string equal $dc "allways"])} {
- set idc [_draw_cross $path $node $exp $x0 $y0]
- set items($node) [lreplace $items($node) 2 2 $idc]
- } else {
- set idc [lindex $items($node) 2]
- $path.c delete $idc
- set items($node) [lreplace $items($node) 2 2 ""]
- }
- }
-
- if {$flag & 7} {
- $path.c itemconfigure $idn -text [Widget::getoption $path.$node -text] -fill [Widget::getoption $path.$node -fill] -font [_get_option $path $node -font]
- }
- }
- }
-
-
- proc Tree::_draw_tree { path } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- if {[info exists items]} { unset items }
-
- $path.c delete all
- set cursor [$path.c cget -cursor]
- $path.c configure -cursor watch
-
- set x0 8
- if {![Widget::getoption $path -showlines]} { set x0 0 }
-
- Tree::_draw_subnodes $path [lrange $data(root) 1 end] $x0 [expr {-[Widget::cget $path -deltay]/2}] [Widget::getoption $path -deltax] [Widget::cget $path -deltay] [Widget::getoption $path -padx] [Widget::getoption $path -showlines]
- $path.c configure -cursor $cursor
- }
-
-
- proc Tree::_redraw_tree { path } {
- Widget::getVariable $path data
-
- if {[Widget::getoption $path -redraw]} {
- if {$data(upd,level) == 2} {
- _update_nodes $path
- } elseif {$data(upd,level) == 3} {
- _draw_tree $path
- }
- _redraw_selection $path
- _update_scrollregion $path
- set data(upd,nodes) {}
- set data(upd,level) 0
- set data(upd,afterid) ""
- }
- }
-
-
- proc Tree::_redraw_selection { path } {
- Widget::getVariable $path data
-
- set selbg [Widget::cget $path -selectbackground]
- set selfg [Widget::cget $path -selectforeground]
- set fill [Widget::getoption $path -selectfill]
- if {$fill} {
- set scroll [$path.c cget -scrollregion]
- if {[llength $scroll]} {
- set xmax [expr {[lindex $scroll 2]-1}]
- } else {
- set xmax [winfo width $path]
- }
- }
- foreach id [$path.c find withtag sel] {
- set node [Tree::_get_node_name $path $id 1]
- $path.c itemconfigure "n:$node" -fill [Widget::getoption $path.$node -fill]
- }
- $path.c delete sel
- foreach node $data(selnodes) {
- set bbox [$path.c bbox "n:$node"]
- if {[llength $bbox]} {
- if {$fill} {
- set bbox [$path.c bbox "n:$node" "i:$node"]
- set bbox [list 0 [lindex $bbox 1] $xmax [lindex $bbox 3]]
- }
- set id [$path.c create rectangle $bbox -tags [list sel s:$node] -fill $selbg -outline $selbg]
- $path.c itemconfigure "n:$node" -fill $selfg
- $path.c lower $id
- }
- }
- }
-
-
- proc Tree::_redraw_idle { path level } {
- Widget::getVariable $path data
-
- if {[Widget::getoption $path -redraw] && $data(upd,afterid) == ""} {
- set data(upd,afterid) [after idle [list Tree::_redraw_tree $path]]
- }
- if {$level > $data(upd,level)} {
- set data(upd,level) $level
- }
- return ""
- }
-
-
- proc Tree::_init_drag_cmd { path X Y top } {
- set path [winfo parent $path]
- set ltags [$path.c gettags current]
- set item [lindex $ltags 1]
- if {[string equal $item "node"]
- || [string equal $item "img"]
- || [string equal $item "win"]} {
- set node [Tree::_get_node_name $path current 2]
- if {[llength [set cmd [Widget::getoption $path -draginitcmd]]]} {
- return [uplevel \#0 $cmd [list $path $node $top]]
- }
- if {[set type [Widget::getoption $path -dragtype]] == ""} {
- set type "TREE_NODE"
- }
- if {[set img [Widget::getoption $path.$node -image]] != ""} {
- pack [label $top.l -image $img -padx 0 -pady 0]
- }
- return [list $type {copy move link} $node]
- }
- return {}
- }
-
-
- proc Tree::_drop_cmd { path source X Y op type dnddata } {
- set path [winfo parent $path]
- Widget::getVariable $path data
-
- $path.c delete drop
- if {[string length $data(dnd,afterid)]} {
- after cancel $data(dnd,afterid)
- set data(dnd,afterid) ""
- }
- set data(dnd,scroll) ""
- if {[llength $data(dnd,node)]
- && [llength [set cmd [Widget::getoption $path -dropcmd]]]} {
- return [uplevel \#0 $cmd [list $path $source $data(dnd,node) $op $type $dnddata]]
- }
- return 0
- }
-
-
- proc Tree::_over_cmd { path source event X Y op type dnddata } {
- set path [winfo parent $path]
- Widget::getVariable $path data
-
- if {[string equal $event "leave"]} {
- $path.c delete drop
- if {[string length $data(dnd,afterid)]} {
- after cancel $data(dnd,afterid)
- set data(dnd,afterid) ""
- }
- set data(dnd,scroll) ""
- return 0
- }
-
- if {[string equal $event "enter"]} {
- set mode [Widget::getoption $path -dropovermode]
- set data(dnd,mode) 0
- foreach c {w p n} {
- set data(dnd,mode) [expr {($data(dnd,mode) << 1)
- | ([string first $c $mode] != -1)}]
- }
- set bbox [$path.c bbox all]
- if {[llength $bbox]} {
- set data(dnd,xs) [lindex $bbox 2]
- set data(dnd,empty) 0
- } else {
- set data(dnd,xs) 0
- set data(dnd,empty) 1
- }
- set data(dnd,node) {}
- }
-
- set x [expr {$X-[winfo rootx $path]}]
- set y [expr {$Y-[winfo rooty $path]}]
-
- $path.c delete drop
- set data(dnd,node) {}
-
- if {$data(dnd,mode) != 4 && [_auto_scroll $path $x $y] != ""} { return 2 }
-
- if {$data(dnd,mode) & 4} {
- set target [list widget]
- set vmode 4
- } else {
- set target [list ""]
- set vmode 0
- }
-
- if {($data(dnd,mode) & 2) && $data(dnd,empty)} {
- lappend target [list root 0]
- set vmode [expr {$vmode | 2}]
- }
-
- set xs $data(dnd,xs)
- set xc [$path.c canvasx $x]
- if {$xc <= $xs} {
- set yc [$path.c canvasy $y]
- set dy [$path.c cget -yscrollincrement]
- set line [expr {int($yc/$dy)}]
- set xi 0
- set yi [expr {$line*$dy}]
- set ys [expr {$yi+$dy}]
- set found 0
- foreach id [$path.c find overlapping $xi $yi $xs $ys] {
- set ltags [$path.c gettags $id]
- set item [lindex $ltags 1]
- if {[string equal $item "node"]
- || [string equal $item "img"]
- || [string equal $item "win"]} {
- set node [Tree::_get_node_name $path $id 2]
- set found 1
- break
- }
- }
-
- if {$found} {
- set padx [_get_node_padx $path $node]
- set deltax [_get_node_deltax $path $node]
- set xi [expr {[lindex [$path.c coords n:$node] 0] - $padx - 1}]
- if {$data(dnd,mode) & 1} {
- lappend target $node
- set vmode [expr {$vmode | 1}]
- } else {
- lappend target ""
- }
-
- if {$data(dnd,mode) & 2} {
- if {$yc >= $yi+$dy/2} {
- if {[Widget::getoption $path.$node -open] &&
- [llength $data($node)] > 1} {
- set parent $node
- set index 0
- set xli [expr {$xi-5}]
- } elseif {[Widget::getoption $path.$node -open]} {
- set parent $node
- set index 0
- set xli [expr {$xi-5}]
- } else {
- set parent [lindex $data($node) 0]
- set index [lsearch -exact $data($parent) $node]
- set xli [expr {$xi - $deltax - 5}]
- }
- set yl $ys
- } else {
- set parent [lindex $data($node) 0]
- set index [expr {[lsearch -exact $data($parent) $node] - 1}]
- set xli [expr {$xi - $deltax - 5}]
- set yl $yi
- }
- lappend target [list $parent $index]
- set vmode [expr {$vmode | 2}]
- } else {
- lappend target {}
- }
-
- if {($vmode & 3) == 3} {
- if {$yc-$yi <= 3 || $ys-$yc <= 3} {
- lappend target "position"
- } else {
- lappend target "node"
- }
- }
- }
- }
-
- if {$vmode && [llength [set cmd [Widget::getoption $path -dropovercmd]]]} {
- set res [uplevel \#0 $cmd [list $path $source $target $op $type $dnddata]]
- set code [lindex $res 0]
- set newmode 0
- if {$code & 1} {
- set mode [lindex $res 1]
- if {($vmode & 1) && [string equal $mode "node"]} {
- set newmode 1
- } elseif {($vmode & 2) && [string equal $mode "position"]} {
- set newmode 2
- } elseif {($vmode & 4) && [string equal $mode "widget"]} {
- set newmode 4
- }
- }
- set vmode $newmode
- } else {
- if {($vmode & 3) == 3} {
- if {[string equal [lindex $target 3] "position"]} {
- set vmode [expr {$vmode & ~1}]
- } else {
- set vmode [expr {$vmode & ~2}]
- }
- }
-
- if {$data(dnd,mode) == 4 || $data(dnd,mode) == 0} {
- set code 1
- } else {
- set code 3
- }
- }
-
- if {!$data(dnd,empty)} {
- if {$vmode & 1} {
- set data(dnd,node) [list "node" [lindex $target 1]]
- $path.c create rectangle $xi $yi $xs $ys -tags drop
- } elseif {$vmode & 2} {
- set data(dnd,node) [concat "position" [lindex $target 2]]
- $path.c create line [list $xli [expr {$yl-$dy/2}] $xli $yl $xs $yl] -tags drop
- } elseif {$vmode & 4} {
- set data(dnd,node) [list "widget"]
- } else {
- set code [expr {$code & 2}]
- }
- }
-
- if {$code & 1} {
- DropSite::setcursor based_arrow_down
- } else {
- DropSite::setcursor dot
- }
- return $code
- }
-
-
- proc Tree::_drag_and_drop { path from endItem operation type startItem } {
- if {[winfo parent $from] != $path} { return }
-
- set place [lindex $endItem 0]
-
- switch -- $place {
- "node" {
- set node [lindex $endItem 1]
- set parent [$path parent $node]
- set index [$path index $node]
- }
-
- "position" {
- set parent [lindex $endItem 1]
- set index [lindex $endItem 2]
- }
-
- default {
- return
- }
- }
-
- if {[string equal $operation "copy"]} {
- set options [Widget::options $path.$startItem]
- eval $path insert $idx [list $startItem#auto] $options
- } else {
- $path move $parent $startItem $index
- }
- }
-
-
- proc Tree::_auto_scroll { path x y } {
- Widget::getVariable $path data
-
- set xmax [winfo width $path]
- set ymax [winfo height $path]
- set scroll {}
- if {$y <= 6} {
- if {[lindex [$path.c yview] 0] > 0} {
- set scroll [list yview -1]
- DropSite::setcursor sb_up_arrow
- }
- } elseif {$y >= $ymax-6} {
- if {[lindex [$path.c yview] 1] < 1} {
- set scroll [list yview 1]
- DropSite::setcursor sb_down_arrow
- }
- } elseif {$x <= 6} {
- if {[lindex [$path.c xview] 0] > 0} {
- set scroll [list xview -1]
- DropSite::setcursor sb_left_arrow
- }
- } elseif {$x >= $xmax-6} {
- if {[lindex [$path.c xview] 1] < 1} {
- set scroll [list xview 1]
- DropSite::setcursor sb_right_arrow
- }
- }
-
- if {[string length $data(dnd,afterid)]
- && ![string equal $data(dnd,scroll) $scroll]} {
- after cancel $data(dnd,afterid)
- set data(dnd,afterid) ""
- }
-
- set data(dnd,scroll) $scroll
- if {[string length $scroll] && ![string length $data(dnd,afterid)]} {
- set data(dnd,afterid) [after 200 [list Tree::_scroll $path $scroll]]
- }
- return $data(dnd,afterid)
- }
-
-
- proc Tree::_scroll { path cmd dir } {
- Widget::getVariable $path data
-
- if {($dir == -1 && [lindex [$path.c $cmd] 0] > 0)
- || ($dir == 1 && [lindex [$path.c $cmd] 1] < 1)} {
- $path.c $cmd scroll $dir units
- set data(dnd,afterid) [after 100 [list Tree::_scroll $path $cmd $dir]]
- } else {
- set data(dnd,afterid) ""
- DropSite::setcursor dot
- }
- }
-
-
- proc Tree::_keynav {which win} {
-
- set nodes {}
- foreach nodeItem [$win.c find withtag node] {
- set node [Tree::_get_node_name $win $nodeItem 2]
- if {[Widget::cget $win.$node -selectable]} {
- lappend nodes $node
- }
- }
-
- set node [_get_current_node $win]
-
- switch -exact -- $which {
- "up" {
- if {![string length $node]} { return }
-
- set index [lsearch -exact $nodes $node]
- incr index -1
- if {$index >= 0} {
- $win selection set [lindex $nodes $index]
- _set_current_node $win [lindex $nodes $index]
- $win see [lindex $nodes $index]
- return
- }
- }
-
- "down" {
- if {![string length $node]} {
- $win selection set [lindex $nodes 0]
- _set_current_node $win [lindex $nodes 0]
- $win see [lindex $nodes 0]
- return
- }
-
- set index [lsearch -exact $nodes $node]
- incr index
- if {$index < [llength $nodes]} {
- $win selection set [lindex $nodes $index]
- _set_current_node $win [lindex $nodes $index]
- $win see [lindex $nodes $index]
- return
- }
- }
-
- "right" {
- if {![string length $node]} { return }
-
- if {[Widget::getoption $path.$node -open]} {
- if { [llength [$win nodes $node]] } {
- set index [lsearch -exact $nodes $node]
- incr index
- if {$index < [llength $nodes]} {
- $win selection set [lindex $nodes $index]
- _set_current_node $win [lindex $nodes $index]
- $win see [lindex $nodes $index]
- return
- }
- }
- } else {
- $win itemconfigure $node -open 1
- if {[llength [set cmd [Widget::getoption $win -opencmd]]]} {
- uplevel \#0 $cmd [list $node]
- }
- return
- }
- }
-
- "left" {
- if {![string length $node]} { return }
-
- if {[Widget::getoption $path.$node -open]} {
- $win itemconfigure $node -open 0
- if {[llength [set cmd [Widget::getoption $win -closecmd]]]} {
- uplevel \#0 $cmd [list $node]
- }
- return
- } else {
- set parent [$win parent $node]
- if {[string equal $parent "root"]} {
- set parent $node
- } else {
- while {![$win itemcget $parent -selectable]} {
- set parent [$win parent $parent]
- if {[string equal $parent "root"]} {
- set parent $node
- break
- }
- }
- }
- $win selection set $parent
- _set_current_node $win $parent
- $win see $parent
- return
- }
- }
-
- "space" {
- if {[string length $node]} {
- Tree::toggle $path $node
- }
- }
- }
- }
-
-
- proc Tree::_get_current_node {win} {
- if {[info exists selectTree::selectCursor($win)]} {
- set result $selectTree::selectCursor($win)
- } elseif {[llength [set selList [$win selection get]]]} {
- set result [lindex $selList 0]
- } else {
- set result ""
- }
- return $result
- }
-
-
- proc Tree::_set_current_node {win node} {
- if {[info exists selectTree::selectCursor($win)]} {
- set selectTree::selectCursor($win) $node
- }
- return
- }
-
-
- proc Tree::_get_node_name {path {item current} {tagindex end-1}} {
- return [string range [lindex [$path.c gettags $item] $tagindex] 2 end]
- }
-
- proc Tree::_get_node_padx {path node} {
- set padx [Widget::getoption $path.$node -padx]
- if {$padx < 0} { set padx [Widget::getoption $path -padx] }
- return $padx
- }
-
- proc Tree::_get_node_deltax {path node} {
- set deltax [Widget::getoption $path.$node -deltax]
- if {$deltax < 0} { set deltax [Widget::getoption $path -deltax] }
- return $deltax
- }
-
-
- proc Tree::_get_node_tags {path node {tags ""}} {
- eval [linsert $tags 0 lappend list TreeItemSentinal]
- if {[Widget::getoption $path.$node -helptext] == ""} { return $list }
-
- switch -- [Widget::getoption $path.$node -helptype] {
- balloon {
- lappend list BwHelpBalloon
- }
- variable {
- lappend list BwHelpVariable
- }
- }
- return $list
- }
-
- proc Tree::_set_help { path node } {
- Widget::getVariable $path help
-
- set item $path.$node
- set opts [list -helptype -helptext -helpvar]
- foreach {cty ctx cv} [eval [linsert $opts 0 Widget::hasChangedX $item]] break
- set text [Widget::getoption $item -helptext]
-
- if { (![info exists help($node)] && $text != "") || $cty || $ctx || $cv } {
- set help($node) 1
- set type [Widget::getoption $item -helptype]
- switch $type {
- balloon {
- DynamicHelp::register $path.c balloon n:$node $text
- DynamicHelp::register $path.c balloon i:$node $text
- DynamicHelp::register $path.c balloon b:$node $text
- }
- variable {
- set var [Widget::getoption $item -helpvar]
- DynamicHelp::register $path.c variable n:$node $var $text
- DynamicHelp::register $path.c variable i:$node $var $text
- DynamicHelp::register $path.c variable b:$node $var $text
- }
- }
- }
- }
-
- proc Tree::_mouse_select { path cmd args } {
- eval [linsert $args 0 selection $path $cmd]
- switch -- $cmd {
- "add" - "clear" - "remove" - "set" - "toggle" {
- event generate $path <<TreeSelect>>
- }
- }
- }
-
-
- proc Tree::_node_name { path node } {
- set map [list & _ | _ ^ _ ! _]
- return [string map $map $node]
- }
-
-
- proc Tree::_get_option { path node option {default ""} } {
- return [Widget::getOption $option $default $path.$node $path]
- }
-
-
- proc Tree::_destroy { path } {
- Widget::getVariable $path data
-
- if {[string length $data(upd,afterid)]} {
- after cancel $data(upd,afterid)
- }
-
- if {[string length $data(dnd,afterid)]} {
- after cancel $data(dnd,afterid)
- }
-
- _subdelete $path [lrange $data(root) 1 end]
- Widget::destroy $path
- }
-
-
- namespace eval ListBox {
- Widget::define ListBox listbox DragSite DropSite DynamicHelp
-
- namespace eval Item {
- Widget::declare ListBox::Item {
- {-indent Int 0 0 "%d >= 0"}
- {-text String "" 0}
- {-font String "" 0}
- {-foreground Color2 "" 0}
- {-image String "" 0}
- {-window String "" 0}
- {-data String "" 0}
-
- {-fg Synonym -foreground}
- {-fill Synonym -foreground}
- }
- }
-
- DynamicHelp::include ListBox::Item balloon
-
- Widget::tkinclude ListBox canvas .c remove {
- -insertwidth -insertbackground -insertborderwidth -insertofftime
- -insertontime -selectborderwidth -closeenough -confine -scrollregion
- -xscrollincrement -yscrollincrement -width -height -bg -background
- -fg -foreground -selectbackground -selectforeground
- } initialize {
- -relief sunken -borderwidth 2 -takefocus 1
- -highlightthickness 0 -width 200
- }
-
- DragSite::include ListBox "LISTBOX_ITEM" 1
- DropSite::include ListBox {
- LISTBOX_ITEM {copy {} move {}}
- }
-
- Widget::declare ListBox {
- {-deltax Int 10 0 "%d >= 0"}
- {-deltay Int 15 0 "%d >= 0"}
- {-padx Int 20 0 "%d >= 0"}
- {-foreground Color "SystemButtonText" 0 listbox}
- {-background Color "SystemWindow" 0 listbox}
- {-selectbackground Color "SystemHighlight" 0 listbox}
- {-selectforeground Color "SystemHighlightText" 0 listbox}
- {-font String "TkTextFont" 0 listbox}
- {-width TkResource "" 0 listbox}
- {-height TkResource "" 0 listbox}
- {-redraw Boolean 1 0}
- {-multicolumn Boolean 0 0}
- {-dropovermode Flag "wpi" 0 "wpi"}
- {-selectmode Enum none 1
- {none single multiple}}
- {-dropcmd String "ListBox::_drag_and_drop" 0}
- {-autofocus Boolean 1 1}
- {-selectfill Boolean 0 1}
-
- {-sortargs String "" 0}
- {-sortinsert Boolean 0 0}
-
- {-fg Synonym -foreground}
- {-bg Synonym -background}
- }
-
- bind ListBox <FocusIn> [list after idle {BWidget::refocus %W %W.c}]
- bind ListBox <Destroy> [list ListBox::_destroy %W]
- bind ListBox <Configure> [list ListBox::_resize %W]
- bind ListBoxFocus <1> [list focus %W]
- bind ListBox <Key-Up> [list ListBox::_keyboard_navigation %W -1]
- bind ListBox <Key-Down> [list ListBox::_keyboard_navigation %W 1]
-
- BWidget::bindMouseWheel ListBoxCanvas
-
- variable _edit
- }
-
-
- proc ListBox::create { path args } {
- Widget::initArgs ListBox $args maps
-
- frame $path -class ListBox -bd 0 -highlightthickness 0 -relief flat -takefocus 0
-
- if {[package vsatisfies $::tk_version 8.4]} {
- $path configure -padx 0 -pady 0
- }
-
- Widget::initFromODB ListBox $path $maps(ListBox)
-
- Widget::getVariable $path data
-
- set data(nrows) -1
-
- set data(items) {}
- set data(anchor) ""
- set data(selitems) {}
-
- set data(upd,level) 0
- set data(upd,afterid) ""
- set data(upd,level) 0
- set data(upd,delete) {}
-
- set data(dnd,scroll) ""
- set data(dnd,afterid) ""
- set data(dnd,item) ""
-
- eval [list canvas $path.c] $maps(.c) -xscrollincrement 8 -background [Widget::getoption $path -background]
- pack $path.c -expand yes -fill both
-
- DragSite::setdrag $path $path.c ListBox::_init_drag_cmd [Widget::cget $path -dragendcmd] 1
- DropSite::setdrop $path $path.c ListBox::_over_cmd ListBox::_drop_cmd 1
-
- Widget::create ListBox $path
-
- set w [Widget::cget $path -width]
- set h [Widget::cget $path -height]
- set dy [Widget::cget $path -deltay]
- $path.c configure -width [expr {$w*8}] -height [expr {$h*$dy}] -yscrollincrement $dy
-
- set bindtags [bindtags $path.c]
- set bindtags [linsert $bindtags 1 $path ListBoxCanvas]
-
- if {[Widget::cget $path -autofocus]} {
- lappend bindtags ListBoxFocus
- }
- bindtags $path.c $bindtags
-
- bind $path.c <Key-Up> {ListBox::_keyboard_navigation [winfo parent %W] -1}
- bind $path.c <Key-Down> {ListBox::_keyboard_navigation [winfo parent %W] 1}
-
- if {![string equal [Widget::getoption $path -selectmode] "none"]} {
- set cmd ListBox::_multiple_select
- $path bindText <Button-1> [list $cmd $path none]
- $path bindText <Shift-Button-1> [list $cmd $path shift]
- $path bindText <Control-Button-1> [list $cmd $path control]
-
- $path bindImage <Button-1> [list $cmd $path none]
- $path bindImage <Shift-Button-1> [list $cmd $path shift]
- $path bindImage <Control-Button-1> [list $cmd $path control]
- }
-
- return $path
- }
-
-
- proc ListBox::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- proc ListBox::configure { path args } {
- set res [Widget::configure $path $args]
-
- set chdy [Widget::hasChanged $path -deltay dy]
-
- set ch1 [expr {$chdy
- || [Widget::hasChanged $path -padx val]
- || [Widget::hasChanged $path -font font]
- || [Widget::hasChanged $path -multicolumn val]
- || [Widget::hasChanged $path -foreground fg]}]
-
- set ch2 [expr {[Widget::hasChanged $path -selectbackground val] |
- [Widget::hasChanged $path -selectforeground val]}]
-
- if {[Widget::hasChanged $path -height h]} {
- $path.c configure -height [expr {$h*$dy}]
- }
-
- if {[Widget::hasChanged $path -width w]} {
- $path.c configure -width [expr {$w*8}]
- }
-
- if {[Widget::hasChanged $path -background bg]} {
- $path.c configure -background $bg
- $path.c itemconfigure box -fill $bg
- }
-
- if {$chdy} {
- $path.c configure -yscrollincrement $dy
- }
-
- if {$ch1} {
- _redraw_idle $path 2
- } elseif {$ch2} {
- _redraw_idle $path 1
- }
-
- if {[Widget::hasChanged $path -redraw bool] && $bool} {
- Widget::getVariable $path data
- set lvl $data(upd,level)
- set data(upd,level) 0
- _redraw_idle $path $lvl
- }
-
- set force [Widget::hasChanged $path -dragendcmd dragend]
- DragSite::setdrag $path $path.c ListBox::_init_drag_cmd $dragend $force
- DropSite::setdrop $path $path.c ListBox::_over_cmd ListBox::_drop_cmd
-
- return $res
- }
-
-
- proc ListBox::activate { path index } {
-
- }
-
-
- proc ListBox::insert { path index item args } {
- Widget::getVariable $path data
-
- set item [Widget::nextIndex $path $item]
-
- if {[info exists data(item,$item)]} {
- return -code error "item \"$item\" already exists"
- }
-
- Widget::init ListBox::Item $path.$item $args
-
- if {[string equal $index "end"]} {
- lappend data(items) $item
- } else {
- set data(items) [linsert $data(items) $index $item]
- }
-
- set data(item,$item) 0
- set data(upd,create,$item) $item
-
- if {[Widget::getoption $path -sortinsert]} {
- ListBox::_sort_idle $path
- } else {
- ListBox::_redraw_idle $path 2
- }
-
- return $item
- }
-
- proc ListBox::multipleinsert { path index args } {
- Widget::getVariable $path data
-
-
- if {[llength $args] == 1} {
- set args [lindex $args 0]
- }
-
- set count 0
- foreach {item iargs} $args {
- if { [lsearch -exact $data(items) $item] != -1 } {
- return -code error "item \"$item\" already exists"
- }
-
- if {$count==0} {
- Widget::init ListBox::Item $path.$item $iargs
- set firstpath $path.$item
- } else {
- Widget::copyinit ListBox::Item $firstpath $path.$item $iargs
- }
-
- set data(items) [linsert $data(items) $index $item]
- set data(upd,create,$item) $item
-
- incr count
- }
-
- _redraw_idle $path 2
- return $item
- }
-
-
- proc ListBox::itemcget { path item option } {
- return [Widget::cget $path.$item $option]
- }
-
-
- proc ListBox::itemconfigure { path item args } {
- Widget::getVariable $path data
-
- if {![info exists data(item,$item)]} {
- return -code error "item \"$item\" does not exist"
- }
-
- set oldind [Widget::getoption $path.$item -indent]
-
- set res [Widget::configure $path.$item $args]
- set chind [Widget::hasChanged $path.$item -indent indent]
- set chw [Widget::hasChanged $path.$item -window win]
- set chi [Widget::hasChanged $path.$item -image img]
- set cht [Widget::hasChanged $path.$item -text txt]
- set chf [Widget::hasChanged $path.$item -font fnt]
- set chfg [Widget::hasChanged $path.$item -foreground fg]
- set idn [lindex $data(item,$item) 0]
-
- _set_help $path $item
-
- if {![string length $idn]} {
- _redraw_idle $path 2
- return $res
- }
-
- set oldb [$path.c bbox $idn]
- set coords [$path.c coords $idn]
- set padx [Widget::getoption $path -padx]
- set x0 [expr {[lindex $coords 0]-$padx-$oldind+$indent}]
- set y0 [lindex $coords 1]
-
- if {$chw || $chi} {
- set idi [$path.c find withtag i:$item]
- set type [lindex [$path.c gettags $idi] 0]
- if { [string length $win] } {
- if { [string equal $type "win"] } {
- $path.c itemconfigure $idi -window $win
- } else {
- $path.c delete $idi
- $path.c create window $x0 $y0 -window $win -anchor w -tags [list win i:$item]
- }
- } elseif { [string length $img] } {
- if { [string equal $type "img"] } {
- $path.c itemconfigure $idi -image $img
- } else {
- $path.c delete $idi
- $path.c create image $x0 $y0 -image $img -anchor w -tags [list img i:$item]
- }
- } else {
- $path.c delete $idi
- }
- }
-
- if {$cht || $chf || $chfg} {
- set fnt [_getoption $path $item -font]
- set fg [_getoption $path $item -foreground]
- $path.c itemconfigure $idn -text $txt -font $fnt -fill $fg
- _redraw_idle $path 1
- }
-
- if {$chind} {
- $path.c coords $idn [expr {$x0+$padx}] $y0
- $path.c coords i:$item $x0 $y0
- _redraw_idle $path 1
- }
-
- if {[Widget::getoption $path -multicolumn] && ($cht || $chf || $chind)} {
- set bbox [$path.c bbox $idn]
- if {[lindex $bbox 2] > [lindex $oldb 2]} {
- _redraw_idle $path 2
- }
- }
-
- return $res
- }
-
-
- proc ListBox::bindText { path event script } {
- if {[string length $script]} {
- set map [list %W $path]
- set script [string map $map $script]
- append script " \[ListBox::_get_current [list $path]\]"
- }
- $path.c bind "click" $event $script
- }
-
-
- proc ListBox::bindImage { path event script } {
- if {[string length $script]} {
- set map [list %W $path]
- set script [string map $map $script]
- append script " \[ListBox::_get_current [list $path]\]"
- }
- $path.c bind "img" $event $script
- }
-
-
- proc ListBox::delete { path args } {
- Widget::getVariable $path data
-
- foreach litems $args {
- foreach item $litems {
- if {[set idx [lsearch -exact $data(items) $item]] != -1} {
- set data(items) [lreplace $data(items) $idx $idx]
- Widget::destroy $path.$item 0
- unset data(item,$item)
- if {[info exists data(upd,create,$item)]} {
- unset data(upd,create,$item)
- } else {
- lappend data(upd,delete) $item
- }
- }
- }
- }
-
- set sel $data(selitems)
- set data(selitems) {}
- eval [list ListBox::selection $path set] $sel
- _redraw_idle $path 2
-
- return
- }
-
-
- proc ListBox::clear { path } {
- eval [list ListBox::delete $path] [ListBox::items $path]
- }
-
-
- proc ListBox::move { path item index } {
- Widget::getVariable $path data
-
- if {![info exists data(item,$item)]} {
- return -code error "item \"$item\" does not exist"
- }
-
- set idx [lsearch -exact $data(items) $item]
- set data(items) [linsert [lreplace $data(items) $idx $idx] $index $item]
-
- _redraw_idle $path 2
- }
-
-
- proc ListBox::reorder { path neworder } {
- Widget::getVariable $path data
-
- set data(items) [BWidget::lreorder $data(items) $neworder]
- _redraw_idle $path 2
- }
-
-
- proc ListBox::selection { path cmd args } {
- Widget::getVariable $path data
-
- switch -- $cmd {
- "add" {
- foreach item $args {
- if { [lsearch -exact $data(selitems) $item] == -1 } {
- if { [lsearch -exact $data(items) $item] != -1 } {
- lappend data(selitems) $item
- }
- }
- }
- }
-
- "clear" {
- set data(selitems) {}
- }
-
- "get" {
- return $data(selitems)
- }
-
- "includes" {
- return [expr {[lsearch -exact $data(selitems) $args] != -1}]
- }
-
- "range" {
- foreach {item1 item2} $args {break}
-
- if {![info exists data(item,$item1)]} {
- return -code error "item \"$item1\" does not exist"
- }
-
- if {![info exists data(item,$item2)]} {
- return -code error "item \"$item2\" does not exist"
- }
-
- set index1 [ListBox::index $path $item1]
- set index2 [ListBox::index $path $item2]
- set indexes [list $index1 $index2]
- if {$index1 > $index2} {
- set indexes [list $index2 $index1]
- }
-
- set data(selitems) [eval [list ListBox::items $path] $indexes]
- }
-
- "remove" {
- foreach item $args {
- if {[set idx [lsearch -exact $data(selitems) $item]] != -1} {
- set data(selitems) [lreplace $data(selitems) $idx $idx]
- }
- }
- }
-
- "set" {
- set data(selitems) {}
- foreach item $args {
- if { [lsearch -exact $data(selitems) $item] == -1 } {
- if { [lsearch -exact $data(items) $item] != -1 } {
- lappend data(selitems) $item
- }
- }
- }
- }
-
- "toggle" {
- foreach item $args {
- if {[set idx [lsearch -exact $data(selitems) $item]] != -1} {
- set data(selitems) [lreplace $data(selitems) $idx $idx]
- } else {
- lappend data(selitems) $item
- }
- }
- }
-
- default {
- return
- }
- }
-
- _redraw_idle $path 1
- }
-
-
- proc ListBox::exists { path item } {
- Widget::getVariable $path data
- return [info exists data(item,$item)]
- }
-
-
- proc ListBox::index { path item } {
- Widget::getVariable $path data
-
- switch -glob -- $item {
- "active" {
- return [ListBox::selection $path get]
- }
-
- "end" {
- return [llength $data(items)]
- }
-
- "@*" {
- return [ListBox::find $path $item]
- }
-
- default {
- return [lsearch -exact $data(items) $item]
- }
- }
- }
-
-
- proc ListBox::find { path findInfo {confine ""} } {
- Widget::getVariable $path data
-
- if {[regexp -- {^@([0-9]+),([0-9]+)$} $findInfo match x y]} {
- set x [$path.c canvasx $x]
- set y [$path.c canvasy $y]
- } elseif {[regexp -- {^[0-9]+$} $findInfo lineNumber]} {
- set dy [Widget::cget $path -deltay]
- set y [expr {$dy*($lineNumber+0.5)}]
- set confine ""
- } else {
- return -code error "invalid find spec \"$findInfo\""
- }
-
- set found 0
- set xi 0
- foreach xs $data(xlist) {
- if {$x <= $xs} {
- foreach id [$path.c find overlapping $xi $y $xs $y] {
- set ltags [$path.c gettags $id]
- set item [lindex $ltags 0]
- if { [string equal $item "item"] ||
- [string equal $item "img"] ||
- [string equal $item "win"] } {
- set item [string range [lindex $ltags 1] 2 end]
- set found 1
- break
- }
- }
- break
- }
- set xi $xs
- }
-
- if {$found} {
- if {[string equal $confine "confine"]} {
- set xi [expr {[lindex [$path.c coords n:$item] 0]-[Widget::getoption $path -padx]}]
- set xs [lindex [$path.c bbox n:$item] 2]
- if {$x >= $xi && $x <= $xs} {
- return $item
- }
- } else {
- return $item
- }
- }
- return ""
- }
-
-
- proc ListBox::item { path first {last ""} } {
- Widget::getVariable $path data
-
- if { ![string length $last] } {
- return [lindex $data(items) $first]
- } else {
- return [lrange $data(items) $first $last]
- }
- }
-
-
- proc ListBox::items { path {first ""} {last ""}} {
- Widget::getVariable $path data
- if {![string length $first]} { return $data(items) }
- if {![string length $last]} { return [lindex $data(items) $first] }
- return [lrange $data(items) $first $last]
- }
-
-
- proc ListBox::see { path item } {
- Widget::getVariable $path data
-
- if {[Widget::getoption $path -redraw] && $data(upd,afterid) != ""} {
- after cancel $data(upd,afterid)
- _redraw_listbox $path
- }
- set idn [$path.c find withtag n:$item]
- if {[string length $idn]} {
- ListBox::_see $path $idn right
- ListBox::_see $path $idn left
- }
- }
-
-
- proc ListBox::edit { path item text {verifycmd ""} {clickres 0} {select 1}} {
- variable _edit
- Widget::getVariable $path data
-
- if { [Widget::getoption $path -redraw] && $data(upd,afterid) != "" } {
- after cancel $data(upd,afterid)
- _redraw_listbox $path
- }
- set idn [$path.c find withtag n:$item]
- if { $idn != "" } {
- ListBox::_see $path $idn right
- ListBox::_see $path $idn left
-
- set oldfg [$path.c itemcget $idn -fill]
- set sbg [Widget::cget $path -selectbackground]
- set coords [$path.c coords $idn]
- set x [lindex $coords 0]
- set y [lindex $coords 1]
- set ht [$path.c cget -highlightthickness]
- set bd [expr {[$path.c cget -borderwidth] + $ht}]
- set w [expr {[winfo width $path] - 2 * $bd}]
- set wmax [expr {[$path.c canvasx $w] - $x}]
-
- $path.c itemconfigure $idn -fill [Widget::cget $path -background]
- $path.c itemconfigure s:$item -fill {} -outline {}
-
- set _edit(text) $text
- set _edit(wait) 0
-
- set frame [frame $path.edit -relief flat -borderwidth 0 -highlightthickness 0 -background [Widget::cget $path -background]]
-
- set ent [entry $frame.edit -width 0 -relief solid -borderwidth 1 -highlightthickness 0 -foreground [_getoption $path $item -foreground] -background [Widget::cget $path -background] -selectforeground [Widget::cget $path -selectforeground] -selectbackground $sbg -font [_getoption $path $item -font] -textvariable ListBox::_edit(text)]
- pack $ent -ipadx 8 -anchor w
-
- set idw [$path.c create window $x $y -window $frame -anchor w]
- trace variable ListBox::_edit(text) w [list ListBox::_update_edit_size $path $ent $idw $wmax]
- tkwait visibility $ent
- grab $frame
- BWidget::focus set $ent
- _update_edit_size $path $ent $idw $wmax
- update
-
- if {$select} {
- $ent selection range 0 end
- $ent icursor end
- $ent xview end
- }
-
- bindtags $ent [list $ent Entry]
- bind $ent <Escape> {set ListBox::_edit(wait) 0}
- bind $ent <Return> {set ListBox::_edit(wait) 1}
-
- if {$clickres == 0 || $clickres == 1} {
- bind $frame <Button> [list set ListBox::_edit(wait) $clickres]
- }
-
- set ok 0
- while {!$ok} {
- tkwait variable ListBox::_edit(wait)
- if { !$_edit(wait) || [llength $verifycmd]==0 ||
- [uplevel \#0 $verifycmd [list $_edit(text)]] } {
- set ok 1
- }
- }
-
- trace vdelete ListBox::_edit(text) w [list ListBox::_update_edit_size $path $ent $idw $wmax]
- grab release $frame
- BWidget::focus release $ent
- destroy $frame
- $path.c delete $idw
- $path.c itemconfigure $idn -fill $oldfg
- $path.c itemconfigure s:$item -fill $sbg -outline $sbg
-
- if {$_edit(wait)} {
- return $_edit(text)
- }
- }
- }
-
-
- proc ListBox::xview { path args } {
- return [eval [linsert $args 0 $path.c xview]]
- }
-
-
- proc ListBox::yview { path args } {
- return [eval [linsert $args 0 $path.c yview]]
- }
-
-
- proc ListBox::getcanvas { path } {
- return $path.c
- }
-
-
- proc ListBox::curselection { path } {
- return [$path selection get]
- }
-
-
- proc ListBox::sort { path } {
- Widget::getVariable $path data
-
- foreach item $data(items) {
- lappend list [list [Widget::getoption $path.$item -text] $item]
- }
-
- set data(items) [list]
- foreach pair [eval lsort [Widget::getoption $path -sortargs] [list $list]] {
- lappend data(items) [lindex $pair 1]
- }
-
- if {[info exists data(sort,afterid)]} {
- unset data(sort,afterid)
- }
-
- _redraw_idle $path 2
- }
-
-
- proc ListBox::_sort_idle { path } {
- Widget::getVariable $path data
-
- if {![info exists data(sort,afterid)]} {
- set data(sort,afterid) [after idle [list ListBox::sort $path]]
- }
- }
-
-
- proc ListBox::_update_edit_size { path entry idw wmax args } {
- set entw [winfo reqwidth $entry]
- if { $entw >= $wmax } {
- $path.c itemconfigure $idw -width $wmax
- } else {
- $path.c itemconfigure $idw -width 0
- }
- }
-
-
- proc ListBox::_getoption { path item option } {
- set value [Widget::getoption $path.$item $option]
- if {![string length $value]} {
- set value [Widget::getoption $path $option]
- }
- return $value
- }
-
-
- proc ListBox::_destroy { path } {
- Widget::getVariable $path data
-
- if {$data(upd,afterid) != ""} {
- after cancel $data(upd,afterid)
- }
-
- if {$data(dnd,afterid) != ""} {
- after cancel $data(dnd,afterid)
- }
-
- foreach item $data(items) {
- Widget::destroy $path.$item 0
- }
-
- Widget::destroy $path
- }
-
-
- proc ListBox::_see { path idn side } {
- set bbox [$path.c bbox $idn]
- set scrl [$path.c cget -scrollregion]
-
- set ymax [lindex $scrl 3]
- set dy [$path.c cget -yscrollincrement]
- set yv [$path.c yview]
- set yv0 [expr {round([lindex $yv 0]*$ymax/$dy)}]
- set yv1 [expr {round([lindex $yv 1]*$ymax/$dy)}]
- set y [expr {int([lindex [$path.c coords $idn] 1]/$dy)}]
- if { $y < $yv0 } {
- $path.c yview scroll [expr {$y-$yv0}] units
- } elseif { $y >= $yv1 } {
- $path.c yview scroll [expr {$y-$yv1+1}] units
- }
-
- set xmax [lindex $scrl 2]
- set dx [$path.c cget -xscrollincrement]
- set xv [$path.c xview]
- if { [string equal $side "right"] } {
- set xv1 [expr {round([lindex $xv 1]*$xmax/$dx)}]
- set x1 [expr {int([lindex $bbox 2]/$dx)}]
- if { $x1 >= $xv1 } {
- $path.c xview scroll [expr {$x1-$xv1+1}] units
- }
- } else {
- set xv0 [expr {round([lindex $xv 0]*$xmax/$dx)}]
- set x0 [expr {int([lindex $bbox 0]/$dx)}]
- if { $x0 < $xv0 } {
- $path.c xview scroll [expr {$x0-$xv0}] units
- }
- }
- }
-
-
- proc ListBox::_update_scrollregion { path } {
- set bd [$path.c cget -borderwidth]
- set ht [$path.c cget -highlightthickness]
- set bd [expr {2*($bd + $ht)}]
- set w [expr {[winfo width $path] - $bd}]
- set h [expr {[winfo height $path] - $bd}]
- set xinc [$path.c cget -xscrollincrement]
- set yinc [$path.c cget -yscrollincrement]
- set bbox [$path.c bbox item win img]
- if { [llength $bbox] } {
- set xs [lindex $bbox 2]
- set ys [lindex $bbox 3]
-
- if { $w < $xs } {
- set w [expr {int($xs)}]
- if { [set r [expr {$w % $xinc}]] } {
- set w [expr {$w+$xinc-$r}]
- }
- }
- if { $h < $ys } {
- set h [expr {int($ys)}]
- if { [set r [expr {$h % $yinc}]] } {
- set h [expr {$h+$yinc-$r}]
- }
- }
- }
-
- $path.c configure -scrollregion [list 0 0 $w $h]
- }
-
-
- proc ListBox::_update_select_fill { path } {
- Widget::getVariable $path data
-
- set width [winfo width $path]
-
- foreach item $data(items) {
- set bbox [$path.c bbox [lindex $data(item,$item) 0]]
- set bbox [list 0 [lindex $bbox 1] $width [lindex $bbox 3]]
- $path.c coords [lindex $data(item,$item) 2] $bbox
- }
-
- _redraw_selection $path
- }
-
-
- proc ListBox::_draw_item {path item x0 x1 y bg selfill multi ww} {
- set indent [Widget::getoption $path.$item -indent]
- set i [$path.c create text [expr {$x1+$indent}] $y -text [Widget::getoption $path.$item -text] -fill [_getoption $path $item -foreground] -font [_getoption $path $item -font] -anchor w -tags [list item n:$item click]]
-
- lappend citems $i
-
- if { [set win [Widget::getoption $path.$item -window]] != "" } {
- set i [$path.c create window [expr {$x0+$indent}] $y -window $win -anchor w -tags [list win i:$item]]
- lappend citems $i
- } elseif { [set img [Widget::getoption $path.$item -image]] != "" } {
- set i [$path.c create image [expr {$x0+$indent}] $y -image $img -anchor w -tags [list img i:$item]]
- lappend citems $i
- } else {
- lappend citems ""
- }
-
-
- if {$selfill && !$multi} {
- set bbox [$path.c bbox n:$item]
- set bbox [list 0 [lindex $bbox 1] $ww [lindex $bbox 3]]
- set tags [list box b:$item click]
- set i [$path.c create rect $bbox -fill $bg -width 0 -tags $tags]
- $path.c lower $i
- lappend citems $i
- } else {
- lappend citems ""
- }
-
- Widget::getVariable $path data
- set data(item,$item) $citems
-
- _set_help $path $item
- }
-
-
- proc ListBox::_redraw_items { path } {
- Widget::getVariable $path data
-
- set cursor [$path.c cget -cursor]
- $path.c configure -cursor watch
- update idletasks ; # make sure watch cursor is reflected
-
- set dx [Widget::getoption $path -deltax]
- set dy [Widget::cget $path -deltay]
- set padx [Widget::getoption $path -padx]
- set y0 [expr {$dy/2}]
- set x0 4
- set x1 [expr {$x0+$padx}]
- set drawn [list]
- set nitems 0
- set data(xlist) [list]
-
- if {[Widget::getoption $path -multicolumn]} {
- set nrows $data(nrows)
- } else {
- set nrows [llength $data(items)]
- }
-
- foreach item $data(upd,delete) {
- $path.c delete i:$item n:$item s:$item b:$item
- }
-
- set bg [Widget::cget $path -background]
- set selfill [Widget::cget $path -selectfill]
- set multi [Widget::cget $path -multicolumn]
- set ww [winfo width $path]
- foreach item $data(items) {
- if {[info exists data(upd,create,$item)]} {
- _draw_item $path $item $x0 $x1 $y0 $bg $selfill $multi $ww
- set nitem [lindex $data(item,$item) 0]
- set iitem [lindex $data(item,$item) 1]
- set bitem [lindex $data(item,$item) 2]
- unset data(upd,create,$item)
- } else {
- set nitem [lindex $data(item,$item) 0]
- set iitem [lindex $data(item,$item) 1]
- set bitem [lindex $data(item,$item) 2]
- set indent [Widget::getoption $path.$item -indent]
- $path.c coords $nitem [list [expr {$x1+$indent}] $y0]
- if {[string length $iitem]} {
- $path.c coords $iitem [list [expr {$x0+$indent}] $y0]
- }
-
- $path.c itemconfigure $nitem -font [ListBox::_getoption $path $item -font] -fill [ListBox::_getoption $path $item -foreground]
- }
-
- incr y0 $dy
- incr nitems
- if {$selfill} {
- lappend drawn $bitem
- } else {
- lappend drawn $nitem
- }
-
- if {$nitems == $nrows} {
- set y0 [expr {$dy/2}]
- set bbox [eval [linsert $drawn 0 $path.c bbox]]
- set drawn [list]
- set x0 [expr {[lindex $bbox 2]+$dx}]
- set x1 [expr {$x0+$padx}]
- set nitems 0
- lappend data(xlist) [lindex $bbox 2]
- }
- }
-
- if {$nitems && $nitems < $nrows} {
- set bbox [eval [linsert $drawn 0 $path.c bbox]]
- lappend data(xlist) [lindex $bbox 2]
- }
-
- set data(upd,delete) {}
- $path.c configure -cursor $cursor
- }
-
-
- proc ListBox::_redraw_selection { path } {
- Widget::getVariable $path data
-
- set selbg [Widget::cget $path -selectbackground]
- set selfg [Widget::cget $path -selectforeground]
- set selfill [Widget::getoption $path -selectfill]
- set multi [Widget::getoption $path -multicolumn]
- foreach id [$path.c find withtag sel] {
- set item [string range [lindex [$path.c gettags $id] 1] 2 end]
- $path.c itemconfigure [lindex $data(item,$item) 0] -fill [_getoption $path $item -foreground]
- }
- $path.c delete sel
- if {$selfill && !$multi} {
- set width [winfo width $path]
- }
- foreach item $data(selitems) {
- set nitem [lindex $data(item,$item) 0]
- set bbox [$path.c bbox $nitem]
-
- if {[llength $bbox]} {
- if {$selfill && !$multi} {
- set bbox [list 0 [lindex $bbox 1] $width [lindex $bbox 3]]
- }
- set tags [list sel s:$item click]
- set id [$path.c create rectangle $bbox -fill $selbg -outline $selbg -tags $tags]
- $path.c itemconfigure $nitem -fill $selfg
- $path.c lower $id
- $path.c lower b:$item
- }
- }
- }
-
-
- proc ListBox::_redraw_listbox { path } {
- Widget::getVariable $path data
-
- if {[Widget::getoption $path -redraw]} {
- if {$data(upd,level) == 2} {
- _redraw_items $path
- }
-
- _redraw_selection $path
- _update_scrollregion $path
-
- if {[Widget::cget $path -selectfill]} {
- _update_select_fill $path
- }
-
- set data(upd,level) 0
- set data(upd,afterid) ""
- }
- }
-
-
- proc ListBox::_redraw_idle { path level } {
- Widget::getVariable $path data
-
- if {$data(nrows) != -1} {
- if {[Widget::getoption $path -redraw] && $data(upd,afterid) == ""} {
- set data(upd,afterid) [after idle [list ListBox::_redraw_listbox $path]]
- }
- }
- if {$level > $data(upd,level)} {
- set data(upd,level) $level
- }
- }
-
-
- proc ListBox::_resize { path } {
- Widget::getVariable $path data
-
- if {[Widget::getoption $path -multicolumn]} {
- set bd [$path.c cget -borderwidth]
- set ht [$path.c cget -highlightthickness]
- set bd [expr {$bd + $ht}]
- set h [expr {[winfo height $path] - 2*$bd}]
- set nrows [expr {$h/[$path.c cget -yscrollincrement]}]
- if {$nrows == 0} {
- set nrows 1
- }
-
- if {$nrows != $data(nrows)} {
- set data(nrows) $nrows
- _redraw_idle $path 2
- } else {
- _update_scrollregion $path
- }
- } elseif {$data(nrows) == -1} {
- set data(nrows) 0
- ListBox::_redraw_listbox $path
- if {[Widget::cget $path -selectfill]} {
- _update_select_fill $path
- }
- } else {
- if {[Widget::cget $path -selectfill]} {
- _update_select_fill $path
- }
-
- _update_scrollregion $path
- }
- }
-
-
- proc ListBox::_init_drag_cmd { path X Y top } {
- set path [winfo parent $path]
- set ltags [$path.c gettags current]
- set item [lindex $ltags 0]
- if {[string equal $item "item"]
- || [string equal $item "img"]
- || [string equal $item "win"]} {
- set item [string range [lindex $ltags 1] 2 end]
- if {[llength [set cmd [Widget::getoption $path -draginitcmd]]]} {
- return [uplevel \#0 $cmd [list $path $item $top]]
- }
- if { [set type [Widget::getoption $path -dragtype]] == "" } {
- set type "LISTBOX_ITEM"
- }
- if { [set img [Widget::getoption $path.$item -image]] != "" } {
- pack [label $top.l -image $img -padx 0 -pady 0]
- }
- return [list $type {copy move link} $item]
- }
- return {}
- }
-
-
- proc ListBox::_drop_cmd { path source X Y op type dnddata } {
- set path [winfo parent $path]
- Widget::getVariable $path data
-
- if { [string length $data(dnd,afterid)] } {
- after cancel $data(dnd,afterid)
- set data(dnd,afterid) ""
- }
- $path.c delete drop
- set data(dnd,scroll) ""
- if { [llength $data(dnd,item)] || ![llength $data(items)] } {
- if {[llength [set cmd [Widget::getoption $path -dropcmd]]]} {
- return [uplevel \#0 $cmd [list $path $source $data(dnd,item) $op $type $dnddata]]
- }
- }
- return 0
- }
-
-
- proc ListBox::_over_cmd { path source event X Y op type dnddata } {
- set path [winfo parent $path]
- Widget::getVariable $path data
-
- if { [string equal $event "leave"] } {
- $path.c delete drop
- if { [string length $data(dnd,afterid)] } {
- after cancel $data(dnd,afterid)
- set data(dnd,afterid) ""
- }
- set data(dnd,scroll) ""
- return 0
- }
-
- if { [string equal $event "enter"] } {
- set mode [Widget::getoption $path -dropovermode]
- set data(dnd,mode) 0
- foreach c {w p i} {
- set data(dnd,mode) [expr {($data(dnd,mode) << 1) | ([string first $c $mode] != -1)}]
- }
- }
-
- set x [expr {$X-[winfo rootx $path]}]
- set y [expr {$Y-[winfo rooty $path]}]
- $path.c delete drop
- set data(dnd,item) ""
-
- if { $data(dnd,mode) != 4 && [_auto_scroll $path $x $y] != "" } {
- return 2
- }
-
- if { $data(dnd,mode) & 4 } {
- set target [list widget]
- set vmode 4
- } else {
- set target [list ""]
- set vmode 0
- }
- if { ($data(dnd,mode) & 2) && ![llength $data(items)] } {
- lappend target "" 0
- set vmode [expr {$vmode | 2}]
- }
-
- if { ($data(dnd,mode) & 3) && [llength $data(items)]} {
- set len [llength $data(items)]
- set xc [$path.c canvasx $x]
- set yc [$path.c canvasy $y]
- set dy [$path.c cget -yscrollincrement]
- set line [expr {int($yc/$dy)}]
- set yi [expr {$line*$dy}]
- set ys [expr {$yi+$dy}]
- set xi 0
- set pos $line
- if { [Widget::getoption $path -multicolumn] } {
- set nrows $data(nrows)
- } else {
- set nrows $len
- }
- if { $line < $nrows } {
- foreach xs $data(xlist) {
- if { $xc <= $xs } {
- break
- }
- set xi $xs
- incr pos $nrows
- }
- if { $pos < $len } {
- set item [lindex $data(items) $pos]
- set xi [expr {[lindex [$path.c coords n:$item] 0]-[Widget::getoption $path -padx]-1}]
- if { $data(dnd,mode) & 1 } {
- lappend target $item
- set vmode [expr {$vmode | 1}]
- } else {
- lappend target ""
- }
-
- if { $data(dnd,mode) & 2 } {
- if { $yc >= $yi+$dy/2 } {
- incr pos
- set yl $ys
- } else {
- set yl $yi
- }
- lappend target $pos
- set vmode [expr {$vmode | 2}]
- } else {
- lappend target ""
- }
- } else {
- lappend target "" ""
- }
- } else {
- lappend target "" ""
- }
-
- if { ($vmode & 3) == 3 } {
- if { $yc-$yi <= 3 || $ys-$yc <= 3 } {
- lappend target "position"
- } else {
- lappend target "item"
- }
- }
- }
-
- if {$vmode && [llength [set cmd [Widget::getoption $path -dropovercmd]]]} {
- set res [uplevel \#0 $cmd [list $source $target $op $type $dnddata]]
- set code [lindex $res 0]
- set vmode 0
- if {$code & 1} {
- switch -exact -- [lindex $res 1] {
- item {set vmode 1}
- position {set vmode 2}
- widget {set vmode 4}
- }
- }
- } else {
- if { ($vmode & 3) == 3 } {
- if { [string equal [lindex $target 3] "position"] } {
- set vmode [expr {$vmode & ~1}]
- } else {
- set vmode [expr {$vmode & ~2}]
- }
- }
-
- if { $data(dnd,mode) == 4 || $data(dnd,mode) == 0 } {
- set code 1
- } else {
- set code 3
- }
- }
-
- if {[llength $data(items)]} {
- if { $vmode & 1 } {
- set data(dnd,item) [list "item" [lindex $target 1]]
- if {[Widget::getoption $path -selectfill]} { incr xs -8 }
- $path.c create rectangle $xi $yi $xs $ys -tags drop
- } elseif { $vmode & 2 } {
- set data(dnd,item) [concat "position" [lindex $target 2]]
- $path.c create line $xi $yl $xs $yl -tags drop
- } elseif { $vmode & 4 } {
- set data(dnd,item) [list "widget"]
- } else {
- set code [expr {$code & 2}]
- }
- }
-
- if { $code & 1 } {
- DropSite::setcursor based_arrow_down
- } else {
- DropSite::setcursor dot
- }
- return $code
- }
-
-
- proc ListBox::_auto_scroll { path x y } {
- Widget::getVariable $path data
-
- set xmax [winfo width $path]
- set ymax [winfo height $path]
- set scroll {}
- if { $y <= 6 } {
- if { [lindex [$path.c yview] 0] > 0 } {
- set scroll [list yview -1]
- DropSite::setcursor sb_up_arrow
- }
- } elseif { $y >= $ymax-6 } {
- if { [lindex [$path.c yview] 1] < 1 } {
- set scroll [list yview 1]
- DropSite::setcursor sb_down_arrow
- }
- } elseif { $x <= 6 } {
- if { [lindex [$path.c xview] 0] > 0 } {
- set scroll [list xview -1]
- DropSite::setcursor sb_left_arrow
- }
- } elseif { $x >= $xmax-6 } {
- if { [lindex [$path.c xview] 1] < 1 } {
- set scroll [list xview 1]
- DropSite::setcursor sb_right_arrow
- }
- }
-
- if { [string length $data(dnd,afterid)] && ![string equal $data(dnd,scroll) $scroll] } {
- after cancel $data(dnd,afterid)
- set data(dnd,afterid) ""
- }
-
- set data(dnd,scroll) $scroll
- if { [llength $scroll] && ![string length $data(dnd,afterid)] } {
- set data(dnd,afterid) [after 200 [list ListBox::_scroll $path $scroll]]
- }
- return $data(dnd,afterid)
-
- }
-
- proc ListBox::_multiple_select { path mode item } {
- Widget::getVariable $path data
-
- if {![info exists data(item,$data(anchor))]} { set data(anchor) $item }
-
- if {[string equal [Widget::getoption $path -selectmode] "single"]} {
- set mode none
- }
-
- switch -exact -- $mode {
- "none" {
- _mouse_select $path set $item
- set data(anchor) $item
- }
-
- "control" {
- _mouse_select $path toggle $item
- set data(anchor) $item
- }
-
- "shift" {
- _mouse_select $path range $data(anchor) $item
- }
- }
- }
-
-
- proc ListBox::_scroll { path cmd dir } {
- Widget::getVariable $path data
-
- if { ($dir == -1 && [lindex [$path.c $cmd] 0] > 0) ||
- ($dir == 1 && [lindex [$path.c $cmd] 1] < 1) } {
- $path $cmd scroll $dir units
- set data(dnd,afterid) [after 100 [list ListBox::_scroll $path $cmd $dir]]
- } else {
- set data(dnd,afterid) ""
- DropSite::setcursor dot
- }
- }
-
- proc ListBox::_set_help { path node } {
- Widget::getVariable $path help
-
- set item $path.$node
- set opts [list -helptype -helptext -helpvar]
- foreach {cty ctx cv} [eval [linsert $opts 0 Widget::hasChangedX $item]] break
- set text [Widget::getoption $item -helptext]
-
- if { (![info exists help($node)] && $text != "") || $cty || $ctx || $cv } {
- set help($node) 1
- set type [Widget::getoption $item -helptype]
- switch $type {
- balloon {
- DynamicHelp::register $path.c balloon n:$node $text
- DynamicHelp::register $path.c balloon i:$node $text
- DynamicHelp::register $path.c balloon b:$node $text
- }
- variable {
- set var [Widget::getoption $item -helpvar]
- DynamicHelp::register $path.c variable n:$node $var $text
- DynamicHelp::register $path.c variable i:$node $var $text
- DynamicHelp::register $path.c variable b:$node $var $text
- }
- }
- }
- }
-
- proc ListBox::_mouse_select { path cmd args } {
- eval [linsert $args 0 selection $path $cmd]
- switch -- $cmd {
- "add" - "clear" - "remove" - "set" - "toggle" - "range" {
- event generate $path <<ListboxSelect>>
- }
- }
- }
-
-
- proc ListBox::_get_current { path } {
- set t [$path.c gettags current]
- return [string range [lindex $t 1] 2 end]
- }
-
-
- proc ListBox::_drag_and_drop { path from endItem operation type startItem } {
- if {[winfo parent $from] != $path} { return }
-
- set place [lindex $endItem 0]
- set i [lindex $endItem 1]
-
- switch -- $place {
- "position" {
- set idx $i
- }
-
- "item" {
- set idx [$path index $i]
- }
-
- default {
- return
- }
- }
-
- if {$idx > [$path index $startItem]} { incr idx -1 }
-
- if {[string equal $operation "copy"]} {
- set options [Widget::options $path.$startItem]
- eval [linsert $options 0 $path insert $idx $startItem\#auto]
- } else {
- $path move $startItem $idx
- }
- }
-
-
- proc ListBox::_keyboard_navigation { path dir } {
- Widget::getVariable $path data
-
- set sel [$path index [lindex [$path selection get] end]]
- if {$dir > 0} {
- incr sel
- if {$sel >= [llength $data(items)]} { return }
- } else {
- incr sel -1
- if {$sel < 0} { return }
- }
- set item [lindex $data(items) $sel]
- ListBox::see $path $item
- _mouse_select $path set $item
- }
-
-
- namespace eval Separator {
- Widget::define Separator separator
-
- Widget::declare Separator {
- {-background Color "SystemButtonFace" 0}
- {-cursor String "" 0}
- {-relief Enum groove 0 {ridge groove}}
- {-orient Enum horizontal 1 {horizontal vertical}}
- {-bg Synonym -background}
- }
- Widget::addmap Separator "" :cmd { -background {} -cursor {} }
-
- bind Separator <Destroy> [list Widget::destroy %W]
- }
-
-
- proc Separator::create { path args } {
- Widget::initArgs Separator $args maps
-
- eval [list frame $path -class Separator] $maps(:cmd)
-
- Widget::initFromODB Separator $path $maps(Separator)
-
- if {[string equal [Widget::cget $path -orient] "horizontal"]} {
- $path configure -borderwidth 1 -height 2
- } else {
- $path configure -borderwidth 1 -width 2
- }
-
- if {[string equal [Widget::cget $path -relief] "groove"]} {
- $path configure -relief sunken
- } else {
- $path configure -relief raised
- }
-
- return [Widget::create Separator $path]
- }
-
-
- proc Separator::configure { path args } {
- set res [Widget::configure $path $args]
-
- if { [Widget::hasChanged $path -relief relief] } {
- if { $relief == "groove" } {
- $path:cmd configure -relief sunken
- } else {
- $path:cmd configure -relief raised
- }
- }
-
- return $res
- }
-
-
- proc Separator::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- namespace eval TTKButton {
- Widget::define TTKButton button DynamicHelp
-
- Widget::tkinclude TTKButton ttk::button :cmd remove { -class }
-
- Widget::declare TTKButton {
- {-name String "" 0 }
- {-repeatdelay Int 0 0 "%d >= 0" }
- {-repeatinterval Int 0 0 "%d >= 0" }
- }
-
- if 0 {
- Widget::declare Button {
- {-name String "" 0 }
- {-text String "" 0 }
- {-textvariable String "" 0 }
- {-underline Int -1 0 "%d >= -1" }
- {-armcommand String "" 0 }
- {-disarmcommand String "" 0 }
- {-command String "" 0 }
- {-state TkResource "" 0 button }
- {-repeatdelay Int 0 0 "%d >= 0" }
- {-repeatinterval Int 0 0 "%d >= 0" }
- {-relief Enum raised 0
- {raised sunken flat ridge solid groove link}}
- {-image String "" 0 }
- {-activeimage String "" 0 }
- {-pressedimage String "" 0 }
- {-disabledimage String "" 0 }
- }
-
- Widget::syncoptions Button "" :cmd { -text {} -underline {} }
- }
-
- DynamicHelp::include TTKButton balloon
-
- variable _current ""
- variable _pressed ""
-
- }
-
-
- proc TTKButton::create { path args } {
- foreach {opt val} $args {
- if {[Widget::optionExists TTKButton $opt]} {
- lappend opts $opt $val
- }
- }
-
- Widget::initArgs TTKButton $opts maps
-
- eval [list ttk::button $path] $maps(:cmd)
-
- Widget::initFromODB TTKButton $path $maps(TTKButton)
-
- set var [$path cget -textvariable]
- if {![string length $var]} {
- set desc [BWidget::getname [Widget::getoption $path -name]]
- if {[llength $desc]} {
- set text [lindex $desc 0]
- set under [lindex $desc 1]
- $path configure -text $text -underline $under
- } else {
- set text [$path cget -text]
- set under [$path cget -underline]
- }
- } else {
- set text ""
- set under -1
- $path configure -underline $under
- }
-
- set top [winfo toplevel $path]
- bindtags $path [list $path TButton TTKButton $top all]
-
- DynamicHelp::sethelp $path $path 1
-
- return [Widget::create TTKButton $path]
- }
-
-
- proc TTKButton::configure { path args } {
- set oldunder [$path:cmd cget -underline]
- if {$oldunder != -1} {
- set text [$path:cmd cget -text]
- set oldaccel1 [string tolower [string index $text $oldunder]]
- set oldaccel2 [string toupper $oldaccel1]
- } else {
- set oldaccel1 ""
- set oldaccel2 ""
- }
- set res [Widget::configure $path $args]
-
- if {[Widget::anyChangedX $path -textvariable -name -text -underline]} {
- set var [Widget::cget $path -textvariable]
- set text [Widget::cget $path -text]
- set under [Widget::cget $path -underline]
-
- if {![string length $var]} {
- set desc [BWidget::getname [Widget::cget $path -name]]
- if {[llength $desc]} {
- set text [lindex $desc 0]
- set under [lindex $desc 1]
- }
- } else {
- set under -1
- set text ""
- }
- set top [winfo toplevel $path]
- if {![string equal $oldaccel1 ""]} {
- bind $top <Alt-$oldaccel1> {}
- bind $top <Alt-$oldaccel2> {}
- }
- set accel1 [string tolower [string index $text $under]]
- set accel2 [string toupper $accel1]
- if {![string equal $accel1 ""]} {
- bind $top <Alt-$accel1> [list TTKButton::invoke $path]
- bind $top <Alt-$accel2> [list TTKButton::invoke $path]
- }
- $path:cmd configure -text $text -underline $under -textvariable $var
- }
-
- DynamicHelp::sethelp $path $path
-
- return $res
- }
-
-
- proc TTKButton::cget { path option } {
- Widget::cget $path $option
- }
-
-
- proc TTKButton::state { path args } {
- return [uplevel #0 [list $path:cmd state] $args]
- }
-
-
- proc TTKButton::instate { path args } {
- return [uplevel #0 [list $path:cmd instate] $args]
- }
-
-
- proc TTKButton::invoke { path } {
- return [uplevel #0 [list $path:cmd invoke]]
- }
-
-
- proc TTKButton::_enter { path } {
- variable _current
- variable _pressed
-
- set _current $path
- if {![string equal [Widget::cget $path -state] "disabled"]} {
- $path:cmd configure -state active
- if {[string equal $_pressed $path]} {
- $path:cmd configure -relief sunken
- } elseif {[string equal [Widget::cget $path -relief] "link"]} {
- $path:cmd configure -relief raised
- }
-
- set image [Widget::cget $path -activeimage]
- if {[string equal $_pressed $path]} {
- set pressedimage [Widget::cget $path -pressedimage]
- if {![string equal $pressedimage ""]} { set image $pressedimage }
- }
- if {![string equal $image ""]} { $path:cmd configure -image $image }
- }
- }
-
-
- proc TTKButton::_leave { path } {
- variable _current
- variable _pressed
-
- set _current ""
- if {[string equal [Widget::cget $path -state] "disabled"]} {
- set dimg [Widget::cget $path -disabledimage]
- if {![string equal $dimg ""]} { $path:cmd configure -state normal }
- } else {
- set relief [Widget::cget $path -relief]
- if {[string equal $_pressed $path]} {
- if {[string equal $relief "link"]} {
- set relief raised
- }
- } elseif {[string equal $relief "link"]} {
- set relief flat
- }
-
- $path:cmd configure -relief $relief -state [Widget::cget $path -state] -image [Widget::cget $path -image]
- }
- }
-
-
- proc TTKButton::_press { path } {
- variable _pressed
-
- if {![string equal [Widget::cget $path -state] "disabled"]} {
- set _pressed $path
- $path:cmd configure -relief sunken
-
- set img [Widget::cget $path -pressedimage]
- if {![string equal $img ""]} { $path:cmd configure -image $img }
-
- set cmd [Widget::getoption $path -armcommand]
- if {![string equal $cmd ""]} {
- uplevel \#0 $cmd
- set repeatdelay [Widget::getoption $path -repeatdelay]
- set repeatint [Widget::getoption $path -repeatinterval]
- if {$repeatdelay > 0} {
- after $repeatdelay [list TTKButton::_repeat $path]
- } elseif {$repeatint > 0} {
- after $repeatint [list TTKButton::_repeat $path]
- }
- }
- }
- }
-
-
- proc TTKButton::_release { path } {
- variable _current
- variable _pressed
-
- if {[string equal $_pressed $path]} {
- set pressed $_pressed
- set _pressed ""
- set relief [Widget::getoption $path -relief]
- after cancel [list TTKButton::_repeat $path]
-
- if {[string equal $relief "link"]} {
- set relief raised
- }
-
- set image [Widget::cget $path -image]
- if {[string equal $pressed $path]} {
- set activeimage [Widget::cget $path -activeimage]
- if {![string equal $activeimage ""]} { set image $activeimage }
- }
-
- $path:cmd configure -relief $relief -image $image
-
- set cmd [Widget::getoption $path -disarmcommand]
- if {![string equal $cmd ""]} {
- uplevel \#0 $cmd
- }
-
- if {[string equal $_current $path] &&
- ![string equal [Widget::cget $path -state] "disabled"] && [set cmd [Widget::getoption $path -command]] != ""} {
- uplevel \#0 $cmd
- }
- }
- }
-
-
- proc TTKButton::_repeat { path } {
- variable _current
- variable _pressed
-
- if {$_current == $path && $_pressed == $path &&
- ![string equal [Widget::cget $path -state] "disabled"] &&
- [set cmd [Widget::getoption $path -armcommand]] != ""} {
- uplevel \#0 $cmd
- }
- if { $_pressed == $path &&
- ([set delay [Widget::getoption $path -repeatinterval]] >0 ||
- [set delay [Widget::getoption $path -repeatdelay]] > 0) } {
- after $delay [list TTKButton::_repeat $path]
- }
- }
-
-
- namespace eval Button {
- if {[BWidget::using ttk]} {
- Widget::define Button button TTKButton DynamicHelp
- } else {
- Widget::define Button button DynamicHelp
- }
-
- set remove [list -command -relief -text -textvariable -underline -image -state]
- if {[info tclversion] > 8.3} {
- lappend remove -repeatdelay -repeatinterval
- }
-
- Widget::tkinclude Button button :cmd remove $remove
-
- Widget::declare Button {
- {-name String "" 0 }
- {-text String "" 0 }
- {-textvariable String "" 0 }
- {-underline Int -1 0 "%d >= -1" }
- {-armcommand String "" 0 }
- {-disarmcommand String "" 0 }
- {-command String "" 0 }
- {-state TkResource "" 0 button }
- {-repeatdelay Int 0 0 "%d >= 0" }
- {-repeatinterval Int 0 0 "%d >= 0" }
- {-relief Enum raised 0
- {raised sunken flat ridge solid groove link}}
- {-image String "" 0 }
- {-activeimage String "" 0 }
- {-pressedimage String "" 0 }
- {-disabledimage String "" 0 }
- }
-
- Widget::addmap Button "" :cmd { -text {} -underline {} }
-
- DynamicHelp::include Button balloon
-
- variable _current ""
- variable _pressed ""
-
- bind BwButton <Enter> {Button::_enter %W}
- bind BwButton <Leave> {Button::_leave %W}
- bind BwButton <ButtonPress-1> {Button::_press %W}
- bind BwButton <ButtonRelease-1> {Button::_release %W}
- bind BwButton <Key-space> {Button::invoke %W; break}
- bind BwButton <Return> {Button::invoke %W; break}
- bind BwButton <Destroy> {Widget::destroy %W}
- }
-
-
- proc Button::create { path args } {
- if {[BWidget::using ttk]} {
- return [eval [list TTKButton::create $path] $args]
- }
-
- Widget::initArgs Button $args maps
-
- eval [list button $path] $maps(:cmd)
-
- Widget::initFromODB Button $path $maps(Button)
-
- set var [$path cget -textvariable]
- if {![string length $var]} {
- set desc [BWidget::getname [Widget::getoption $path -name]]
- if {[llength $desc]} {
- set text [lindex $desc 0]
- set under [lindex $desc 1]
- $path configure -text $text -underline $under
- } else {
- set text [$path cget -text]
- set under [$path cget -underline]
- }
- } else {
- set text ""
- set under -1
- $path configure -underline $under
- }
-
- set relief [Widget::getoption $path -relief]
- if {[string equal $relief "link"]} { set relief flat }
-
- set opts [list]
- lappend opts -text $text -underline $under -textvariable $var
- lappend opts -relief $relief -state [Widget::cget $path -state]
- lappend opts -image [Widget::cget $path -image]
-
- eval [list $path configure] $opts
-
- set top [winfo toplevel $path]
- bindtags $path [list $path BwButton $top all]
-
- set accel1 [string tolower [string index $text $under]]
- set accel2 [string toupper $accel1]
- if {[string length $accel1]} {
- bind $top <Alt-$accel1> [list Button::invoke $path]
- bind $top <Alt-$accel2> [list Button::invoke $path]
- }
-
- DynamicHelp::sethelp $path $path 1
-
- return [Widget::create Button $path]
- }
-
-
- proc Button::configure { path args } {
- set oldunder [$path:cmd cget -underline]
- if {$oldunder != -1} {
- set text [$path:cmd cget -text]
- set oldaccel1 [string tolower [string index $text $oldunder]]
- set oldaccel2 [string toupper $oldaccel1]
- } else {
- set oldaccel1 ""
- set oldaccel2 ""
- }
- set res [Widget::configure $path $args]
-
- if {[Widget::anyChangedX $path -relief -state]} {
- set state [Widget::cget $path -state]
- set relief [Widget::cget $path -relief]
- if {[string equal $relief "link"]} {
- if {[string equal $state "active"]} {
- set relief "raised"
- } else {
- set relief "flat"
- }
- }
-
- $path:cmd configure -relief $relief
-
- set dimg [Widget::cget $path -disabledimage]
- if {[string equal $state "disabled"] && ![string equal $dimg ""]} {
- $path:cmd configure -image $dimg
- } else {
- $path:cmd configure -state $state -image [Widget::cget $path -image] -background [Widget::cget $path -background] -foreground [Widget::cget $path -foreground]
- }
- }
-
- if {[Widget::hasChanged $path -image image]} {
- $path:cmd configure -image $image
- }
-
- if {[Widget::anyChangedX $path -textvariable -name -text -underline]} {
- set var [Widget::cget $path -textvariable]
- set text [Widget::cget $path -text]
- set under [Widget::cget $path -underline]
-
- if {![string length $var]} {
- set desc [BWidget::getname [Widget::cget $path -name]]
- if {[llength $desc]} {
- set text [lindex $desc 0]
- set under [lindex $desc 1]
- }
- } else {
- set under -1
- set text ""
- }
- set top [winfo toplevel $path]
- if {![string equal $oldaccel1 ""]} {
- bind $top <Alt-$oldaccel1> {}
- bind $top <Alt-$oldaccel2> {}
- }
- set accel1 [string tolower [string index $text $under]]
- set accel2 [string toupper $accel1]
- if {![string equal $accel1 ""]} {
- bind $top <Alt-$accel1> [list Button::invoke $path]
- bind $top <Alt-$accel2> [list Button::invoke $path]
- }
- $path:cmd configure -text $text -underline $under -textvariable $var
- }
-
- DynamicHelp::sethelp $path $path
-
- return $res
- }
-
-
- proc Button::cget { path option } {
- Widget::cget $path $option
- }
-
-
- proc Button::invoke { path } {
- if {[string equal [Widget::cget $path -state] "disabled"]} { return }
-
- $path:cmd configure -state active -relief sunken
- update idletasks
-
- set cmd [Widget::getoption $path -armcommand]
- if {![string equal $cmd ""]} {
- uplevel \#0 $cmd
- }
- after 100
- set relief [Widget::getoption $path -relief]
- if {[string equal $relief "link"]} {
- set relief flat
- }
- $path:cmd configure -state [Widget::getoption $path -state] -relief $relief
- set cmd [Widget::getoption $path -disarmcommand]
- if {![string equal $cmd ""]} {
- uplevel \#0 $cmd
- }
- set cmd [Widget::getoption $path -command]
- if {![string equal $cmd ""]} {
- uplevel \#0 $cmd
- }
- }
-
-
- proc Button::_enter { path } {
- variable _current
- variable _pressed
-
- set _current $path
- if {![string equal [Widget::cget $path -state] "disabled"]} {
- $path:cmd configure -state active
- if {[string equal $_pressed $path]} {
- $path:cmd configure -relief sunken
- } elseif {[string equal [Widget::cget $path -relief] "link"]} {
- $path:cmd configure -relief raised
- }
-
- set image [Widget::cget $path -activeimage]
- if {[string equal $_pressed $path]} {
- set pressedimage [Widget::cget $path -pressedimage]
- if {![string equal $pressedimage ""]} { set image $pressedimage }
- }
- if {![string equal $image ""]} { $path:cmd configure -image $image }
- }
- }
-
-
- proc Button::_leave { path } {
- variable _current
- variable _pressed
-
- set _current ""
- if {[string equal [Widget::cget $path -state] "disabled"]} {
- set dimg [Widget::cget $path -disabledimage]
- if {![string equal $dimg ""]} { $path:cmd configure -state normal }
- } else {
- set relief [Widget::cget $path -relief]
- if {[string equal $_pressed $path]} {
- if {[string equal $relief "link"]} {
- set relief raised
- }
- } elseif {[string equal $relief "link"]} {
- set relief flat
- }
-
- $path:cmd configure -relief $relief -state [Widget::cget $path -state] -image [Widget::cget $path -image]
- }
- }
-
-
- proc Button::_press { path } {
- variable _pressed
-
- if {![string equal [Widget::cget $path -state] "disabled"]} {
- set _pressed $path
- $path:cmd configure -relief sunken
-
- set img [Widget::cget $path -pressedimage]
- if {![string equal $img ""]} { $path:cmd configure -image $img }
-
- set cmd [Widget::getoption $path -armcommand]
- if {![string equal $cmd ""]} {
- uplevel \#0 $cmd
- set repeatdelay [Widget::getoption $path -repeatdelay]
- set repeatint [Widget::getoption $path -repeatinterval]
- if {$repeatdelay > 0} {
- after $repeatdelay "Button::_repeat $path"
- } elseif {$repeatint > 0} {
- after $repeatint "Button::_repeat $path"
- }
- }
- }
- }
-
-
- proc Button::_release { path } {
- variable _current
- variable _pressed
-
- if {[string equal $_pressed $path]} {
- set pressed $_pressed
- set _pressed ""
- set relief [Widget::getoption $path -relief]
- after cancel "Button::_repeat $path"
-
- if {[string equal $relief "link"]} {
- set relief raised
- }
-
- set image [Widget::cget $path -image]
- if {[string equal $pressed $path]} {
- set activeimage [Widget::cget $path -activeimage]
- if {![string equal $activeimage ""]} { set image $activeimage }
- }
-
- $path:cmd configure -relief $relief -image $image
-
- set cmd [Widget::getoption $path -disarmcommand]
- if {![string equal $cmd ""]} {
- uplevel \#0 $cmd
- }
-
- if {[string equal $_current $path] &&
- ![string equal [Widget::cget $path -state] "disabled"] && [set cmd [Widget::getoption $path -command]] != ""} {
- uplevel \#0 $cmd
- }
- }
- }
-
-
- proc Button::_repeat { path } {
- variable _current
- variable _pressed
-
- if {$_current == $path && $_pressed == $path &&
- ![string equal [Widget::cget $path -state] "disabled"] &&
- [set cmd [Widget::getoption $path -armcommand]] != ""} {
- uplevel \#0 $cmd
- }
- if { $_pressed == $path &&
- ([set delay [Widget::getoption $path -repeatinterval]] >0 ||
- [set delay [Widget::getoption $path -repeatdelay]] > 0) } {
- after $delay "Button::_repeat $path"
- }
- }
-
-
- namespace eval ButtonBox {
- Widget::define ButtonBox buttonbox Button
-
- namespace eval Button {
- Widget::declare ButtonBox::Button {
- {-tags String "" 0}
- {-hide Boolean 0 0}
- {-value String "" 0}
- {-spacing Int -1 0 "%d >= -1"}
- }
- }
-
- if {[BWidget::using ttk]} {
- Widget::tkinclude ButtonBox ttk::frame :cmd remove { -class -colormap -container -padx -pady -visual }
- } else {
- Widget::tkinclude ButtonBox frame :cmd remove { -class -colormap -container -padx -pady -visual }
- }
-
- Widget::declare ButtonBox {
- {-orient Enum horizontal 0 {horizontal vertical}}
- {-state Enum "normal" 0 {disabled normal}}
- {-homogeneous Boolean 1 0}
- {-spacing Int 10 0 "%d >= 0"}
- {-padx Int 1 0}
- {-pady Int 1 0}
- {-default String -1 0}
- {-rows Int "0" 0}
- {-columns Int "0" 0}
- }
-
- bind ButtonBox <Map> [list ButtonBox::_realize %W]
- bind ButtonBox <Destroy> [list ButtonBox::_destroy %W]
- }
-
-
- proc ButtonBox::create { path args } {
- Widget::initArgs ButtonBox $args maps
-
- if {[BWidget::using ttk]} {
- eval [list ttk::frame $path -class ButtonBox] $maps(:cmd)
- } else {
- eval [list frame $path -class ButtonBox] $maps(:cmd)
- }
-
- Widget::initFromODB ButtonBox $path $maps(ButtonBox)
-
- if {![BWidget::using ttk]
- && [info tclversion] >= 8.4} { $path configure -padx 0 -pady 0 }
-
- Widget::getVariable $path data
-
- set data(max) 0
- set data(nbuttons) 0
- set data(realized) 0
- set data(buttons) [list]
- set data(widgets) [list]
- set data(default) [Widget::getoption $path -default]
-
- return [Widget::create ButtonBox $path]
- }
-
-
- proc ButtonBox::configure { path args } {
- Widget::getVariable $path data
-
- set res [Widget::configure $path $args]
-
- if {[Widget::hasChanged $path -default val]} {
- _select_default $path
- }
-
- if {[Widget::hasChanged $path -state val]} {
- foreach i $data(buttons) {
- $path.b$i configure -state $val
- }
- }
-
- set opts [list -rows -columns -orient -homogeneous]
- if {[eval [list Widget::anyChangedX $path] $opts]} { _redraw $path }
-
- return $res
- }
-
-
- proc ButtonBox::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- proc ButtonBox::add { path args } {
- return [eval insert $path end $args]
- }
-
-
- proc ButtonBox::insert { path idx args } {
- Widget::getVariable $path data
- Widget::getVariable $path tags
-
- set but $path.b$data(nbuttons)
-
- set class Button
- if {[BWidget::using ttk]} { set class TTKButton }
- array set maps [Widget::splitArgs $args $class ButtonBox::Button]
-
- Widget::init ButtonBox::Button $but#bbox $maps(ButtonBox::Button)
-
- set spacing [Widget::getOption -spacing -1 $but#bbox $path]
-
- if {[string equal $idx "end"] && $data(nbuttons)} {
- set data(spacing,$data(nbuttons)) [list left $spacing]
- lappend data(widgets) $but
- lappend data(buttons) $data(nbuttons)
- } else {
- set data(spacing,$data(nbuttons)) [list right $spacing]
- set data(widgets) [linsert $data(widgets) $idx $but]
- set data(buttons) [linsert $data(buttons) $idx $data(nbuttons)]
- }
-
- set opts [list]
- if {![BWidget::using ttk]} {
- lappend opts -padx [Widget::getoption $path -padx]
- lappend opts -pady [Widget::getoption $path -pady]
- }
-
- eval [list Button::create $but] $opts $maps(:cmd) $maps($class)
-
- foreach tag [Widget::getoption $but#bbox -tags] {
- lappend tags($tag) $but
- if {![info exists tags($tag,state)]} { set tags($tag,state) 1 }
- }
-
- _redraw_idle $path
-
- _select_default $path
-
- incr data(nbuttons)
-
- return $but
- }
-
-
- proc ButtonBox::delete { path index } {
- Widget::getVariable $path data
- Widget::getVariable $path tags
-
- set button $path.b$i
- set widget $button#bbox
-
- set i [lindex $data(buttons) $index]
- set data(buttons) [lreplace $data(buttons) $index $index]
- set data(widgets) [lreplace $data(widgets) $index $index]
-
- foreach tag [Widget::getoption $widget -tags] {
- set tags($tag) [BWidget::lremove $tags($tag) $button]
- if {![llength $tags($tag)]} {
- unset tags($tag) tags($tag,state)
- }
- }
-
- Widget::destroy $widget 0
-
- destroy $button
-
- _redraw_idle $path
- }
-
-
- proc ButtonBox::buttons { path {first ""} {last ""} } {
- Widget::getVariable $path data
- if {![string length $first]} { return $data(widgets) }
- if {![string length $last]} { return [lindex $data(widgets) $first] }
- return [lrange $data(widgets) $first $last]
- }
-
-
- proc ButtonBox::itemconfigure { path index args } {
- Widget::getVariable $path data
-
- set idx [index $path $index]
- set button $path.b$idx
-
- set class Button
- if {[BWidget::using ttk]} { set class TTKButton }
-
- if {![llength $args]} {
- set res [${class}::configure $button]
- eval lappend res [Widget::configure $button#bbox [list]]
- return [lsort $res]
- }
-
- if {[llength $args] == 1} {
- if {[Widget::optionExists Button $args]} {
- return [${class}::configure $button $args]
- } else {
- return [Widget::configure $button#bbox $args]
- }
- }
-
- array set maps [Widget::splitArgs $args $class ButtonBox::Button]
-
- if {[info exists maps(ButtonBox::Button)]} {
- set oldtags [Widget::getoption $button#bbox -tags]
-
- Widget::configure $button#bbox $maps(ButtonBox::Button)
-
- if {[Widget::hasChanged $button#bbox -tags newtags]} {
- Widget::getVariable $path tags
-
- foreach tag $oldtags {
- set tags($tag) [BWidget::lremove $tags($tag) $button]
- if {![llength $tags($tag)]} {
- unset tags($tag) tags($tag,state)
- }
- }
-
- foreach tag $newtags {
- lappend tags($tag) $button
- if {![info exists tags($tag,state)]} { set tags($tag,state) 1 }
- }
- }
-
- set redraw 0
-
- if {[Widget::hasChanged $button#bbox -spacing spacing]} {
- set redraw 1
- set data(spacing,$idx) [lreplace $data(spacing,$idx) 1 1 $spacing]
- }
-
- if {[Widget::hasChanged $button#bbox -hide hide]} {
- set redraw 1
- }
-
- if {$redraw} { _redraw_idle $path }
- }
-
- if {[llength $maps(:cmd)] || [llength $maps($class)]} {
- eval [list ${class}::configure $button] $maps(:cmd) $maps($class)
- }
- }
-
-
- proc ButtonBox::itemcget { path index option } {
- set button $path.b[index $path $index]
- if {[Widget::optionExists Button $option]} {
- return [Button::cget $button $option]
- } else {
- return [Widget::cget $button#bbox $option]
- }
- }
-
-
- proc ButtonBox::setfocus { path index } {
- set but $path.b[index $path $index]
- if {[winfo exists $but]} { focus $but }
- }
-
-
- proc ButtonBox::invoke { path index } {
- set but $path.b[index $path $index]
- if {[winfo exists $but]} { $but invoke }
- }
-
-
- proc ButtonBox::index { path index } {
- Widget::getVariable $path data
-
- set n [expr {$data(nbuttons) - 1}]
-
- if {[string is integer -strict $index]} {
- set res $index
- if {$index > $n} { set res $n }
- return $res
- }
-
- if {[string equal $index "default"]} {
- set res [Widget::getoption $path -default]
- } elseif {[string equal $index "end"] || [string equal $index "last"]} {
- set res $n
- } elseif {[set res [lsearch -exact $data(widgets) $index]] > -1} {
- } else {
- foreach i $data(buttons) {
- set w $path.b$i
- lappend text [$w cget -text]
- lappend names [$w cget -name]
- }
- set len [llength $data(buttons)]
- set res [lsearch -exact [concat $names $text] $index]
- if {$res >= $len} { set res [expr {$res - $len}] }
- }
- return $res
- }
-
-
-
- proc ButtonBox::gettags { path } {
- Widget::getVariable $path tags
-
- set tags [list]
-
- foreach tag [array names tags] {
- if {![string match "*,state" $tag]} { lappend tags $tag }
- }
- return $tags
- }
-
-
-
- proc ButtonBox::setbuttonstate { path tag state } {
- Widget::getVariable $path tags
-
- if {![info exists tags($tag)]} { return }
-
- set tags($tag,state) $state
- foreach button $tags($tag) {
- set expression 1
- foreach buttontag [Widget::getoption $button#bbox -tags] {
- lappend expression && $tags($buttontag,state)
- }
-
- if {[expr $expression]} {
- set state normal
- } else {
- set state disabled
- }
-
- $button configure -state $state
- }
- }
-
-
- proc ButtonBox::getbuttonstate { path tag } {
- Widget::getVariable $path tags
-
- if {![info exists tags($tag)]} {
- return -code error "unknown tag \"$tag\""
- }
-
- return $tags($tag,state)
- }
-
-
- proc ButtonBox::_select_default { path } {
- Widget::getVariable $path data
-
- set default [Widget::getoption $path -default]
- set data(default) [ButtonBox::index $path $default]
-
- foreach i $data(buttons) {
- set button $path.b$i
- if {$i == $data(default)} {
- if {[BWidget::using ttk]} {
- $button state focus
- } else {
- $button configure -default active
- }
- } else {
- if {[BWidget::using ttk]} {
- $button state !focus
- } else {
- $button configure -default normal
- }
- }
- incr i
- }
- }
-
-
- proc ButtonBox::_redraw_idle { path } {
- Widget::getVariable $path data
-
- if {![info exists data(redraw)]} {
- set data(redraw) 1
- after idle [list ButtonBox::_redraw $path]
- }
- }
-
-
- proc ButtonBox::_redraw { path } {
- Widget::getVariable $path data
- Widget::getVariable $path buttons
-
- set data(redraw) 1
-
-
- set rows [Widget::getoption $path -rows]
- set cols [Widget::getoption $path -columns]
-
- set idx 0
- set rowidx 0
- set colidx 0
- set idxs [list]
- foreach i $data(buttons) {
- set dir [lindex $data(spacing,$i) 0]
- set spacing [lindex $data(spacing,$i) 1]
- set but $path.b$i
- if {[string equal [Widget::getoption $path -orient] "horizontal"]} {
- if {![Widget::getoption $but#bbox -hide]} {
- grid $but -column $idx -row $rowidx -sticky nsew
- } else {
- grid remove $but
- }
-
- if {[Widget::getoption $path -homogeneous]} {
- set req [winfo reqwidth $but]
- if { $req > $data(max) } {
- grid columnconfigure $path [expr {2*$i}] -minsize $req
- set data(max) $req
- }
- grid columnconfigure $path $idx -minsize $data(max) -weight 1
- } else {
- grid columnconfigure $path $idx -weight 0
- }
-
- set col [expr {$idx - 1}]
- if {[string equal $dir "right"]} { set col [expr {$idx + 1}] }
- if {$col > 0 && [lsearch -exact $idxs $col] < 0} {
- lappend idxs $col
- grid columnconfigure $path $col -minsize $spacing
- }
-
- incr colidx
-
- if {$cols > 0 && $colidx >= $cols} {
- set idx -2
- incr rowidx
- set colidx 0
- }
- } else {
- if {![Widget::getoption $but#bbox -hide]} {
- grid $but -column $colidx -row $idx -sticky nsew
- } else {
- grid remove $but
- }
-
- grid rowconfigure $path $idx -weight 0
-
- set row [expr {$idx - 1}]
- if {[string equal $dir "right"]} { set row [expr {$idx + 1}] }
- if {$row > 0 && [lsearch -exact $idxs $row] < 0} {
- lappend idxs $row
- grid rowconfigure $path $row -minsize $spacing
- }
-
- incr rowidx
-
- if {$rows > 0 && $rowidx >= $rows} {
- set idx -2
- incr colidx
- set rowidx 0
- }
- }
- incr idx 2
- }
-
- unset data(redraw)
- }
-
-
- proc ButtonBox::_realize { path } {
- Widget::getVariable $path data
-
- if {!$data(realized)} {
- set data(realized) 1
- ButtonBox::_redraw $path
- }
- }
-
-
- proc ButtonBox::_destroy { path } {
- Widget::getVariable $path data
-
- foreach i $data(buttons) {
- set button $path.b$i
- Widget::destroy $button#bbox 0
- }
-
- Widget::destroy $path
- }
-
-
- namespace eval Dialog {
- Widget::define Dialog dialog ButtonBox
-
- Widget::bwinclude Dialog ButtonBox .bbox remove {
- -orient -background
- } initialize {
- -spacing 10 -padx 10
- }
-
- Widget::declare Dialog {
- {-background Color "SystemButtonFace" 0}
- {-title String "" 0}
- {-geometry String "" 0}
- {-modal Enum local 0 {none local global}}
- {-bitmap String "" 1}
- {-image String "" 1}
- {-separator Boolean 0 1}
- {-cancel Int -1 0 "%d >= -1"}
- {-parent String "" 0}
- {-side Enum bottom 1 {bottom left top right}}
- {-anchor Enum c 1 {n e w s c}}
- {-class String Dialog 1}
- {-transient Boolean 1 1}
- {-place Enum center 1 {none center left right above below}}
- {-placerelative Boolean 1 1}
-
- {-bg Synonym -background}
- }
-
- if {![BWidget::using ttk]} {
- Widget::addmap Dialog "" :cmd {-background {}}
- Widget::addmap Dialog "" .frame {-background {}}
- }
-
- bind Dialog <Destroy> [list Dialog::_destroy %W]
- }
-
-
- proc Dialog::create { path args } {
- Widget::initArgs Dialog $args maps
-
- array set _args $maps(Dialog)
- set class "Dialog"
- if {[info exists _args(-class)]} { set class $_args(-class) }
-
- if {[string equal $::tcl_platform(platform) "unix"]} {
- set re raised
- set bd 1
- } else {
- set re flat
- set bd 0
- }
- toplevel $path -relief $re -borderwidth $bd -class $class -background $::BWidget::colors(SystemButtonFace)
- wm protocol $path WM_DELETE_WINDOW [list Dialog::enddialog $path -1 1]
-
- Widget::initFromODB Dialog $path $maps(Dialog)
-
- bindtags $path [list $path $class all]
- wm overrideredirect $path 1
- wm title $path [Widget::cget $path -title]
-
- set parent [Widget::cget $path -parent]
- if {![winfo exists $parent]} {
- set parent [winfo parent $path]
- }
-
- if {[Widget::getoption $path -transient]} {
- wm transient $path [winfo toplevel $parent]
- }
- wm withdraw $path
-
- set side [Widget::cget $path -side]
- if {[string equal $side "left"] || [string equal $side "right"]} {
- set orient vertical
- } else {
- set orient horizontal
- }
-
- eval [list ButtonBox::create $path.bbox] $maps(.bbox) -orient $orient
- set frame [frame $path.frame -relief flat -borderwidth 0]
-
- set opts [list]
-
- if {![BWidget::using ttk]} {
- set bg [$path cget -background]
- lappend opts -background $bg
- $path configure -background $bg
- $frame configure -background $bg
- }
-
- if {[set bitmap [Widget::getoption $path -image]] != ""} {
- eval [list label $path.label -image $bitmap] $opts
- } elseif {[set bitmap [Widget::getoption $path -bitmap]] != ""} {
- eval [list label $path.label -bitmap $bitmap] $opts
- }
- if {[Widget::getoption $path -separator]} {
- eval [list Separator::create $path.sep -orient $orient] $opts
- }
-
- Widget::getVariable $path data
- set data(nbut) 0
- set data(realized) 0
-
- bind $path <Return> [list Dialog::ok $path]
- bind $path <Escape> [list Dialog::cancel $path]
-
- return [Widget::create Dialog $path]
- }
-
-
- proc Dialog::configure { path args } {
- set res [Widget::configure $path $args]
-
- if { [Widget::hasChanged $path -title title] } {
- wm title $path $title
- }
- if { [Widget::hasChanged $path -background bg] } {
- if { [winfo exists $path.label] } {
- $path.label configure -background $bg
- }
- if { [winfo exists $path.sep] } {
- Separator::configure $path.sep -background $bg
- }
- }
- return $res
- }
-
-
- proc Dialog::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- proc Dialog::getframe { path } {
- return $path.frame
- }
-
-
- proc Dialog::add { path args } {
- Widget::getVariable $path data
-
- set idx $data(nbut)
- set cmd [list ButtonBox::add $path.bbox -command [list Dialog::enddialog $path $idx]]
- set res [eval $cmd -value $idx $args]
- incr data(nbut)
- return $res
- }
-
-
- proc Dialog::itemconfigure { path index args } {
- return [eval [list ButtonBox::itemconfigure $path.bbox $index] $args]
- }
-
-
- proc Dialog::itemcget { path index option } {
- return [ButtonBox::itemcget $path.bbox $index $option]
- }
-
-
- proc Dialog::invoke { path index } {
- ButtonBox::invoke $path.bbox $index
- }
-
-
- proc Dialog::setfocus { path index } {
- ButtonBox::setfocus $path.bbox $index
- }
-
-
- proc Dialog::enddialog { path result {destroy 0} } {
- Widget::getVariable $path data
-
- if {$result ne -1} {
- if {[ButtonBox::index $path.bbox $result] > -1} {
- set result [ButtonBox::itemcget $path.bbox $result -value]
- }
- }
-
- set data(result) $result
-
- event generate $path <<DialogEnd>>
-
- if {$destroy} {
- destroy $path
- }
-
- return $result
- }
-
-
- proc Dialog::draw { path {focus ""} {overrideredirect 0} {geometry ""} } {
- Widget::getVariable $path data
-
- set parent [Widget::getoption $path -parent]
- if {!$data(realized)} {
- set data(realized) 1
- if {[llength [winfo children $path.bbox]]} {
- set side [Widget::getoption $path -side]
- if {[string equal $side "left"] || [string equal $side "right"]} {
- set pad -padx
- set fill y
- } else {
- set pad -pady
- set fill x
- }
-
- pack $path.bbox -side $side -anchor [Widget::getoption $path -anchor] -padx 1m -pady {5 10}
-
- if {[winfo exists $path.sep]} {
- pack $path.sep -side $side -fill $fill $pad 2m
- }
- }
-
- if {[winfo exists $path.label]} {
- pack $path.label -side left -anchor n -padx {10 5} -pady 3m
- }
-
- pack $path.frame -padx 1m -pady 1m -fill both -expand yes
- }
-
- if {![string length $geometry]} {
- set geometry [Widget::getoption $path -geometry]
- }
-
- set width 0
- set height 0
- set place [Widget::getoption $path -place]
- set usePlace [expr ![string equal $place "none"]]
- if {[string length $geometry]} {
- set split [split $geometry x+-]
-
- if {[llength $split] > 2} {
- set usePlace 0
- } else {
- BWidget::lassign $split width height
- }
- }
-
- wm geometry $path $geometry
-
- if {$usePlace} {
- set relative [Widget::getoption $path -placerelative]
- if {$relative && [winfo exists $parent]} {
- BWidget::place $path $width $height $place $parent
- } else {
- BWidget::place $path $width $height $place
- }
- }
-
- update idletasks
- wm overrideredirect $path $overrideredirect
- wm deiconify $path
-
- if {![winfo exists $parent] || ([wm state [winfo toplevel $parent]] != "withdrawn")} {
- tkwait visibility $path
- }
-
- BWidget::focus set $path
- if {[winfo exists $focus]} {
- focus -force $focus
- } else {
- ButtonBox::setfocus $path.bbox default
- }
-
- if {[set grab [Widget::cget $path -modal]] != "none"} {
- BWidget::grab $grab $path
- set res [Dialog::wait $path]
- withdraw $path
- return $res
- }
-
- return
- }
-
-
- proc Dialog::wait { path } {
- Widget::getVariable $path data
-
- if {[info exists data(result)]} { unset data($result) }
-
- tkwait variable [Widget::widgetVar $path data(result)]
- if {[info exists data(result)]} {
- set res $data(result)
- unset data(result)
- } else {
- set res -1
- }
-
- return $res
- }
-
-
- proc Dialog::withdraw { path } {
- BWidget::grab release $path
- BWidget::focus release $path
- if {[winfo exists $path]} {
- wm withdraw $path
- }
- }
-
-
- proc Dialog::ok { path } {
- ButtonBox::invoke $path.bbox default
- }
-
-
- proc Dialog::cancel { path } {
- ButtonBox::invoke $path.bbox [Widget::getoption $path -cancel]
- }
-
-
- proc Dialog::_destroy { path } {
- BWidget::grab release $path
- BWidget::focus release $path
- Widget::destroy $path
- }
-
-
- namespace eval ScrolledWindow {
- Widget::define ScrolledWindow scrollw
-
- Widget::tkinclude ScrolledWindow frame :cmd remove { -class -colormap -visual }
-
- Widget::declare ScrolledWindow {
- {-class String "ScrolledWindow" 1}
- {-scrollbar Enum both 0 {none both vertical horizontal}}
- {-auto Enum both 0 {none both vertical horizontal}}
- {-sides Enum se 0 {ne en nw wn se es sw ws}}
- {-size Int 0 1 "%d >= 0"}
- {-ipad Int 1 1 "%d >= 0"}
- {-managed Boolean 1 1}
- }
-
- bind ScrolledWindow <Map> [list ScrolledWindow::_realize %W]
- bind ScrolledWindow <Destroy> [list ScrolledWindow::_destroy %W]
- }
-
-
- proc ScrolledWindow::create { path args } {
- Widget::initArgs ScrolledWindow $args maps
-
- array set _args $args
- set class ScrolledWindow
- if {[info exists _args(-class)]} { set class $_args(-class) }
-
- eval [list frame $path -class $class] $maps(:cmd)
-
- Widget::initFromODB ScrolledWindow $path $args
-
- Widget::getVariable $path data
-
- if {![string equal $class "ScrolledWindow"]} {
- set top [winfo toplevel $path]
- bindtags $path [list $path $class ScrolledWindow $top all]
- }
-
- set bg [$path cget -background]
-
- if {[BWidget::using ttk]} {
- ttk::scrollbar $path.vscroll
- ttk::scrollbar $path.hscroll -orient horizontal
- } else {
- scrollbar $path.hscroll -highlightthickness 0 -takefocus 0 -orient horiz -relief sunken -bg $bg
- scrollbar $path.vscroll -highlightthickness 0 -takefocus 0 -orient vert -relief sunken -bg $bg
- }
-
- set data(vmin) -1
- set data(vmax) -1
- set data(hmin) -1
- set data(hmax) -1
-
- set data(afterId) ""
- set data(realized) 0
-
- _setData $path [Widget::cget $path -scrollbar] [Widget::cget $path -auto] [Widget::cget $path -sides]
-
- if {[Widget::cget $path -managed]} {
- set data(hsb,packed) $data(hsb,present)
- set data(vsb,packed) $data(vsb,present)
- } else {
- set data(hsb,packed) 0
- set data(vsb,packed) 0
- }
-
- if {![BWidget::using ttk]} {
- set sbsize [Widget::cget $path -size]
-
- if {$sbsize} {
- $path.vscroll configure -width $sbsize
- $path.hscroll configure -width $sbsize
- }
- }
-
- set data(ipad) [Widget::cget $path -ipad]
-
- if {$data(hsb,packed)} {
- grid $path.hscroll -column 1 -row $data(hsb,row) -sticky ew -ipady $data(ipad)
- }
- if {$data(vsb,packed)} {
- grid $path.vscroll -column $data(vsb,column) -row 1 -sticky ns -ipadx $data(ipad)
- }
-
- grid columnconfigure $path 1 -weight 1
- grid rowconfigure $path 1 -weight 1
-
- return [Widget::create ScrolledWindow $path]
- }
-
-
- proc ScrolledWindow::getframe { path } {
- return $path
- }
-
-
- proc ScrolledWindow::setwidget { path widget } {
- Widget::getVariable $path data
-
- if {[info exists data(widget)] && [winfo exists $data(widget)]
- && ![string equal $data(widget) $widget]} {
- grid remove $data(widget)
- $data(widget) configure -xscrollcommand "" -yscrollcommand ""
- }
-
- set data(widget) $widget
- grid $widget -in $path -row 1 -column 1 -sticky news
-
- $path.hscroll configure -command [list $widget xview]
- $path.vscroll configure -command [list $widget yview]
- $widget configure -xscrollcommand [list ScrolledWindow::_set_hscroll $path] -yscrollcommand [list ScrolledWindow::_set_vscroll $path]
- }
-
-
- proc ScrolledWindow::getwidget { path } {
- Widget::getVariable $path data
- if {[info exists data(widget)]} { return $data(widget) }
- }
-
-
- proc ScrolledWindow::configure { path args } {
- Widget::getVariable $path data
-
- set res [Widget::configure $path $args]
-
- if {[Widget::hasChanged $path -background bg]} {
- catch { $path.hscroll configure -background $bg }
- catch { $path.vscroll configure -background $bg }
- }
-
- if {[Widget::hasChanged $path -scrollbar scrollbar]
- || [Widget::hasChanged $path -auto auto]
- || [Widget::hasChanged $path -sides sides]} {
- _setData $path $scrollbar $auto $sides
-
- BWidget::lassign [$path.hscroll get] vmin vmax
- set data(hsb,packed) [expr {$data(hsb,present) && (!$data(hsb,auto) || ($vmin != 0 || $vmax != 1))}]
-
- BWidget::lassign [$path.vscroll get] vmin vmax
- set data(vsb,packed) [expr {$data(vsb,present) && (!$data(vsb,auto) || ($vmin != 0 || $vmax != 1))}]
-
- set data(ipad) [Widget::cget $path -ipad]
-
- if {$data(hsb,packed)} {
- grid $path.hscroll -column 1 -row $data(hsb,row) -sticky ew -ipady $data(ipad)
- }
- if {$data(vsb,packed)} {
- grid $path.vscroll -column $data(vsb,column) -row 1 -sticky ns -ipadx $data(ipad)
- }
- }
- return $res
- }
-
-
- proc ScrolledWindow::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- proc ScrolledWindow::_set_hscroll { path vmin vmax } {
- Widget::getVariable $path data
-
- $path.hscroll set $vmin $vmax
-
- set data(hmin) $vmin
- set data(hmax) $vmax
-
- _redraw_after $path
- }
-
-
- proc ScrolledWindow::_set_vscroll { path vmin vmax } {
- Widget::getVariable $path data
-
- $path.vscroll set $vmin $vmax
-
- set data(vmin) $vmin
- set data(vmax) $vmax
-
- _redraw_after $path
- }
-
-
- proc ScrolledWindow::_setData {path scrollbar auto sides} {
- Widget::getVariable $path data
-
- set sb [lsearch -exact {none horizontal vertical both} $scrollbar]
- set auto [lsearch -exact {none horizontal vertical both} $auto]
-
- set data(hsb,present) [expr {($sb & 1) != 0}]
- set data(hsb,auto) [expr {($auto & 1) != 0}]
- set data(hsb,row) [expr {[string match *n* $sides] ? 0 : 2}]
-
- set data(vsb,present) [expr {($sb & 2) != 0}]
- set data(vsb,auto) [expr {($auto & 2) != 0}]
- set data(vsb,column) [expr {[string match *w* $sides] ? 0 : 2}]
- }
-
-
- proc ScrolledWindow::_redraw_after { path } {
- Widget::getVariable $path data
- after cancel $data(afterId)
- set data(afterId) [after 5 [list ScrolledWindow::_redraw $path]]
- }
-
-
- proc ScrolledWindow::_redraw { path } {
- if {![Widget::exists $path]} { return }
-
- Widget::getVariable $path data
-
- if {!$data(realized)} { return }
-
- if {$data(hsb,present) && $data(hsb,auto)} {
- if {$data(hsb,packed) && $data(hmin) == 0 && $data(hmax) == 1} {
- set data(hsb,packed) 0
- grid remove $path.hscroll
- } elseif {!$data(hsb,packed) && ($data(hmin)!=0 || $data(hmax)!=1)} {
- set data(hsb,packed) 1
- grid $path.hscroll -column 1 -row $data(hsb,row) -sticky ew -ipady $data(ipad)
- }
- }
-
- if {$data(vsb,present) && $data(vsb,auto)} {
- if {$data(vsb,packed) && $data(vmin) == 0 && $data(vmax) == 1} {
- set data(vsb,packed) 0
- grid remove $path.vscroll
- } elseif {!$data(vsb,packed) && ($data(vmin)!=0 || $data(vmax)!=1) } {
- set data(vsb,packed) 1
- grid $path.vscroll -column $data(vsb,column) -row 1 -sticky ns -ipadx $data(ipad)
- }
- }
- }
-
-
- proc ScrolledWindow::_realize { path } {
- Widget::getVariable $path data
- set data(realized) 1
- }
-
-
- proc ScrolledWindow::_destroy { path } {
- Widget::getVariable $path data
- after cancel $data(afterId)
- Widget::destroy $path
- }
-
-
- if {0} {
-
- IconLibrary icons
-
- icons load -find 1 -directory $kdedir -extension png -findgroups [list {actions act} {apps app} {devices dev}
- {filesystems file} {mimetypes mime}]
- }
-
-
- package require Tcl 8.4
-
- namespace eval IconLibrary {
- Widget::define IconLibrary icons
-
- Widget::declare IconLibrary {
- {-file String "tkIcons" 0}
- {-icons String "" 0}
- {-sizes String "" 0}
- {-groups String "" 0}
- {-create Boolean 0 0}
- {-directory String "" 0}
-
- {-find Boolean 0 0}
- {-extension String "gif" 0}
- {-findsizes String "16 22" 0}
- {-findgroups String "act app dev file mime" 0}
- }
-
- namespace eval Icon {
- Widget::declare IconLibrary::Icon {
- {-size String "" 1}
- {-type String "" 1}
- {-file String "" 1}
- {-data String "" 1}
- {-image String "" 1}
- {-imageargs String "" 1}
- {-filegroup String "" 1}
- {-workgroup String "" 1}
- }
- }
-
- namespace eval NamesArgs {
- Widget::declare IconLibrary::NamesArgs {
- {-icons String "" 0}
- {-sizes String "" 0}
- {-groups String "" 0}
- }
- }
-
- variable sizeMap
- array set sizeMap {
- 16x16 16
- 22x22 22
- 32x32 32
- 48x48 48
- 64x64 64
- 128x128 128
- }
-
- variable groupMapArray
- array set groupMapArray {
- apps app
- actions act
- devices dev
- mimetypes mime
- filesystems file
- }
-
- variable groupMap
-
- foreach name [array names groupMapArray] {
- lappend groupMap [list $name $groupMapArray($name)]
- }
- }
-
-
- proc IconLibrary::create { library args } {
- Widget::init IconLibrary $library $args
-
- Widget::getVariable $library data
-
- set data(icons) [list]
-
- if {[llength $args]} { eval [list IconLibrary::load $library] $args }
-
- return [Widget::create IconLibrary $library 0]
- }
-
-
- proc IconLibrary::load { library args } {
- Widget::getVariable $library data
-
- Widget::init IconLibrary $library $args
-
- set file [Widget::getoption $library -file]
- set create [Widget::getoption $library -create]
- set iconlist [Widget::getoption $library -icons]
- set sizelist [Widget::getoption $library -sizes]
- set grouplist [Widget::getoption $library -groups]
- set directory [Widget::getoption $library -directory]
-
- set filename $file
- if {![string length $directory]} {
- set directory [file dirname $file]
- } elseif {[string length $file]} {
- set filename [file join $directory $file]
- }
-
- if {[Widget::getoption $library -find]} {
- if {![string length $directory]} {
- return -code error "cannot find images without -directory"
- }
-
- set ext [Widget::getoption $library -extension]
- set findsizes [Widget::getoption $library -findsizes]
- set findgroups [Widget::getoption $library -findgroups]
-
- foreach size $findsizes {
- set size [IconLibrary::_get_size $size]
-
- set sizedir [file join $directory $size]
- if {![file exists $sizedir]} { continue }
-
- foreach group $findgroups {
- set filegroup [lindex $group 0]
- set workgroup [lindex $group 1]
- if {[llength $group] == 1} { set workgroup $filegroup }
-
- set groupdir [file join $sizedir $filegroup]
- if {![file exists $groupdir]} { continue }
-
- foreach imagefile [glob -nocomplain -dir $groupdir *.$ext] {
- set image [file root [file tail $imagefile]]
- set image $workgroup$image$size
- lappend data(icons) $image
-
- set icon $library#$image
- set exists [expr {[Widget::exists $icon]
- && [string length [Widget::getoption $icon -image]]}]
-
- Widget::init IconLibrary::Icon $icon [list -size $size -type file -file $imagefile -filegroup $filegroup -workgroup $workgroup -data "" -image ""]
-
- if {$exists && !$create} {
- IconLibrary::image $library $image
- }
- }
- }
- }
-
- if {![file exists $filename]} {
- if {$create} { _create_icons $library $data(icons) }
- set data(icons) [lsort -unique $data(icons)]
- return $data(icons)
- }
- }
-
- if {![file isfile $filename] || ![file readable $filename]} {
- return -code error "couldn't open \"$filename\": no such file"
- }
-
- set iLen [llength $iconlist]
- set sLen [llength $sizelist]
- set gLen [llength $grouplist]
-
- set fp [open $filename]
-
- while {[gets $fp line] != -1} {
- if {[string equal [string index $line 0] "#"]} { continue }
-
- set list [split $line :]
- if {[llength $list] < 5} { continue }
-
- BWidget::lassign $list image workgroup filegroup size type imagedata
- set size [IconLibrary::_get_size_int $size]
-
- if {($gLen && [lsearch -exact $grouplist $workgroup] < 0)
- || ($sLen && [lsearch -exact $sizelist $size] < 0)
- || ($iLen && [lsearch -exact $iconlist $image] < 0)} { continue }
-
- set file ""
- if {[string equal $type "file"]} {
- if {![string length $imagedata]} { continue }
-
- if {[string is integer $size]} { set size ${size}x${size} }
- set file [file join $directory $size $filegroup $imagedata]
- set images($image,file) $file
- }
-
- lappend data(icons) $image
-
- set icon $library#$image
- set exists [expr {[Widget::exists $icon]
- && [string length [Widget::getoption $icon -image]]}]
-
- Widget::init IconLibrary::Icon $icon [list -size $size -type $type -file $file -data $imagedata -filegroup $filegroup -workgroup $workgroup -image ""]
-
- if {$exists && !$create} {
- IconLibrary::image $library $image
- }
- }
-
- close $fp
-
- if {$create} { _create_icons $library $icons }
-
- set data(icons) [lsort -unique $data(icons)]
- }
-
-
- proc IconLibrary::cget { library option } {
- return [Widget::cget $library $option]
- }
-
-
- proc IconLibrary::configure { library args } {
- return [Widget::configure $library $args]
- }
-
-
- proc IconLibrary::itemcget { library image option } {
- if {![IconLibrary::exists $library $image]} {
- return -code error "no such icon '$image'"
- }
-
- set path $library#$image
- set image [Widget::getoption $path -image]
- set created [string length $image]
- if {$created && ($option eq "-file" || $option eq "-data")} {
- return [$image cget $option]
- }
- return [Widget::cget $path $option]
- }
-
-
- proc IconLibrary::itemconfigure { library image args } {
- if {![IconLibrary::exists $library $image]} {
- return -code error "no such icon '$image'"
- }
-
- set path $library#$image
- set image [Widget::getoption $path -image]
- set created [string length $image]
-
- if {![llength $args]} {
- set return [list]
- foreach list [Widget::configure $path $args] {
- set option [lindex $list 0]
- if {$created && ($option eq "-file" || $option eq "-data")} {
- lappend return [$image configure $option]
- } else {
- lappend return $list
- }
- }
- return $return
- } elseif {[llength $args] == 1} {
- set option [lindex $args 0]
- if {$created && ($option eq "-file" || $option eq "-data")} {
- return [$image configure $option]
- } else {
- return [Widget::configure $path $option]
- }
- }
-
- set imageOpts [list]
- set widgetOpts [list]
- foreach [list option value] $args {
- if {$created && ($option eq "-file" || $option eq "-data")} {
- lappend imageOpts $option $value
- } else {
- lappend widgetOpts $option $value
- }
- }
-
- if {[llength $imageOpts]} {
- eval [list $image configure] $imageOpts
- }
-
- if {[llength $widgetOpts]} {
- Widget::configure $path $widgetOpts
- }
- }
-
-
- proc IconLibrary::exists { library image } {
- return [Widget::exists $library#$image]
- }
-
-
- proc IconLibrary::icons { library {pattern ""} } {
- Widget::getVariable $library data
- if {![string length $pattern]} { return $data(icons) }
- return [lsearch -glob -all -inline $data(icons) $pattern]
- }
-
-
- proc IconLibrary::add { library image args } {
- Widget::getVariable $library data
-
- if {[IconLibrary::exists $library $image]} {
- return -code error "icon \"$image\" already exists"
- }
-
- array set _args $args
-
- set create 0
- if {[info exists _args(-create)]} {
- if {$_args(-create)} { set create 1 }
- unset _args(-create)
- }
-
- Widget::init IconLibrary::Icon $library#$image [array get _args]
- lappend data(icons) $image
-
- if {$create} { IconLibrary::image $library $image }
-
- return $image
- }
-
-
- proc IconLibrary::image { library image } {
- Widget::getVariable $library images
-
- if {![IconLibrary::exists $library $image]} {
- return -code error "no such icon '$image'"
- }
-
- set path $library#$image
-
- if {[string equal [Widget::getoption $path -type] "icon"]} {
- set icon $image
- set image [Widget::getoption $path -data]
- set path $library#$image
- if {![IconLibrary::exists $library $image]} {
- return -code error "no such icon '$image' while loading '$icon'"
- }
- }
-
- if {![string length [Widget::getoption $path -image]]} {
- set img ::Icons::${library}::$image
-
- set data [Widget::getoption $path -data]
- set file [Widget::getoption $path -file]
- set args [Widget::getoption $path -imageargs]
-
- if {[string length $data]} {
- lappend args -data $data
- } elseif {[string length $file]} {
- lappend args -file $file
- }
-
- eval [list ::image create photo $img] $args
-
- Widget::setoption $path -image $img -file "" -data ""
- }
-
- return [Widget::getoption $path -image]
- }
-
-
- proc IconLibrary::delete { library args } {
- Widget::getVariable $library data
-
- set images [list]
- foreach icon $args {
- set image [Widget::getoption $library#$icon -image]
- if {[string length $image]} { lappend images $image }
- Widget::destroy $library#$icon 0
- }
-
- if {[llength $images]} { eval ::image delete $images }
-
- set data(icons) [eval [list BWidget::lremove $data(icons)] $args]
-
- return
- }
-
-
- proc IconLibrary::clear { library } {
- Widget::getVariable $library data
- eval [list IconLibrary::delete $library] $data(icons)
- }
-
-
- proc IconLibrary::destroy { library } {
- IconLibrary::clear $library
- Widget::destroy $library
- }
-
-
- proc IconLibrary::_get_size { size } {
- if {[string is integer -strict $size]} { return ${size}x${size} }
- return $size
- }
-
-
- proc IconLibrary::_get_size_int { size } {
- variable sizeMap
- if {[info exists sizeMap($size)]} { return $sizeMap($size) }
- if {[scan $size "%dx%d" w h] == 2 && $w == $h} { return $w }
- return $size
- }
-
-
- proc IconLibrary::_create_icons { library icons } {
- foreach icon $icons {
- IconLibrary::image $library $icon
- }
- }
-
- namespace eval ChooseDirectory {
- Widget::define ChooseDirectory choosedir Dialog ScrolledWindow Tree IconLibrary
-
- Widget::bwinclude ChooseDirectory Dialog :cmd
-
- Widget::declare ChooseDirectory {
- {-name String "" 1}
- {-message String "Please choose a directory, then select OK." 0}
- {-folders String "" 0}
- {-initialdir String "" 0}
- }
-
- bind ChooseDirectory <Destroy> [list ChooseDirectory::_destroy %W]
- }
-
-
- proc ChooseDirectory::create { path args } {
- variable dialogs
-
- BWidget::LoadBWidgetIconLibrary
-
- set dialog $path#choosedir
-
- array set maps [Widget::splitArgs $args Dialog ChooseDirectory]
-
- Widget::initFromODB ChooseDirectory $dialog $maps(ChooseDirectory)
-
- Widget::getVariable $dialog nodes
- set nodes(count) 0
-
- eval [list Dialog::create $path -class ChooseDirectory -anchor e -default 1 -cancel 2 -modal local -spacing 5 -homogeneous 0 -title "Browse for Folder" -geometry 340x300] $maps(:cmd) $maps(Dialog)
- wm protocol $path WM_DELETE_WINDOW [list $path cancel]
-
- set frame [Dialog::getframe $path]
-
- grid rowconfigure $frame 3 -weight 1
- grid columnconfigure $frame 0 -weight 1
-
- Label $frame.message -anchor w -autowrap 1 -justify left -text [Widget::getoption $dialog -message]
- grid $frame.message -row 0 -column 0 -sticky new -pady 5
-
- Label $frame.dirlabel -anchor w -elide 1 -elideside center -textvariable [Widget::widgetVar $path root]
- grid $frame.dirlabel -row 1 -column 0 -sticky new -pady 5
-
- if {[BWidget::using ttk]} {
- ttk::entry $frame.e -textvariable [Widget::widgetVar $path tail]
- } else {
- entry $frame.e -textvariable [Widget::widgetVar $path tail]
- }
- grid $frame.e -row 2 -column 0 -sticky ew -pady 2 -padx 1
- bind $frame.e <Key> [list ChooseDirectory::_update_ok_button $path]
-
- ScrolledWindow $frame.sw
- grid $frame.sw -row 3 -column 0 -sticky news
-
- set tree $frame.tree
- Tree $tree -width 35 -opencmd [list ChooseDirectory::_open_directory $path $tree] -closecmd [list ChooseDirectory::_close_directory $path $tree]
-
- $frame.sw setwidget $tree
-
- $tree bindText <1> [list ChooseDirectory::_select_directory $path $tree]
- $tree bindImage <1> [list ChooseDirectory::_select_directory $path $tree]
-
- $tree bindText <Double-1> [list Tree::toggle $tree]
- $tree bindImage <Double-1> [list Tree::toggle $tree]
-
- Dialog::add $path -text " Make New Folder " -spacing 20 -command [list ChooseDirectory::_create_directory $path $tree]
- Dialog::add $path -name ok -width 12
- Dialog::add $path -name cancel -width 12
-
- set folders [Widget::getoption $dialog -folders]
- if {![llength $folders]} {
- set desktop [file normalize [file join ~ Desktop]]
- set documents [file normalize [file join ~ Documents]]
- if {[info exists ::env(HOME)]} {
- set desktopText Desktop
-
- if {$::tcl_platform(platform) eq "windows"} {
- set documentsText "My Documents"
- } else {
- set documentsText "Documents"
- }
-
- set desktop [file join $::env(HOME) $desktopText]
- set documents [file join $::env(HOME) $documentsText]
- }
-
- if {[file exists $desktop]} {
- lappend folders [list [file normalize $desktop] $desktopText]
- }
-
- if {[file exists $documents]} {
- lappend folders [list [file normalize $documents] $documentsText]
- }
-
- if {$::tcl_platform(platform) eq "windows"} {
- foreach volume [file volumes] {
- if {[string match "?:/" $volume]} {
- lappend folders [list $volume $volume]
- }
- }
- } else {
- lappend folders [list / /]
- }
- }
-
- foreach list $folders {
- set dir [lindex $list 0]
- set text [lindex $list 1]
- set image [lindex $list 2]
-
- if {![string length $image]} { set image [BWidget::Icon folder16] }
-
- set nodes(root,$dir) [incr nodes(count)]
- $tree insert end root $nodes(root,$dir) -text $text -image $image -data $dir -drawcross allways
- }
-
- set dir [Widget::getoption $dialog -initialdir]
- if {![string length $dir]} { set dir [pwd] }
- set dir [file normalize $dir]
-
- set name [Widget::getoption $dialog -name]
- if {[info exists dialogs($name)]} { set dir $dialogs($name) }
-
- set dirpath [list]
- foreach sub [file split $dir] {
- if {![llength $dirpath]} {
- set node $nodes(root,$sub)
- set rootNode $node
-
- lappend dirpath $sub
- $tree itemconfigure $node -open 1
- } else {
- set parent $node
- lappend dirpath $sub
- set subpath [eval file join $dirpath]
-
- if {![info exists nodes($rootNode,$subpath)]} {
- set nodes($rootNode,$subpath) [incr nodes(count)]
- $tree insert end $parent $nodes($rootNode,$subpath) -open 1 -image [BWidget::Icon folder16] -text $sub -data $subpath
- }
- set node $nodes($rootNode,$subpath)
- }
-
- ChooseDirectory::_open_directory $path $tree $node
- }
-
- _select_directory $path $tree $node
-
- $frame.e selection range 0 end
-
- set result [Dialog::draw $path $frame.e]
-
- Widget::getVariable $path root
- Widget::getVariable $path tail
- set dirroot $root
- set dirtail $tail
-
- destroy $path
-
- if {$result == 2} { return }
-
- if {$dirtail ne [file tail $dirroot]} {
- set dirroot [file join $dirroot $dirtail]
- }
-
- if {[string length $name]} { set dialogs($name) $dirroot }
-
- return $dirroot
- }
-
-
- proc ChooseDirectory::_select_directory { path tree node } {
- Widget::getVariable $path root
- Widget::getVariable $path tail
-
- $tree see $node
- $tree selection set $node
-
- set dir [$tree itemcget $node -data]
- set root $dir
- set tail [file tail $dir]
- }
-
-
- proc ChooseDirectory::_open_directory { path tree node } {
- Widget::getVariable $path#choosedir nodes
-
- set parent [$tree parent $node]
- set rootNode $node
- while {$parent ne "root"} {
- set rootNode $parent
- set parent [$tree parent $parent]
- }
-
- set sort -ascii
- if {$::tcl_platform(platform) eq "windows"} { set sort -dict }
-
- set rootdir [$tree itemcget $node -data]
-
- set dirs [glob -nocomplain -type d -dir $rootdir *]
- eval lappend dirs [glob -nocomplain -type {d hidden} -dir $rootdir *]
-
- set found 0
- foreach dir [lsort $sort $dirs] {
- set tail [file tail $dir]
- if {$tail eq "." || $tail eq ".."} { continue }
-
- set found 1
- if {![info exists nodes($rootNode,$dir)]} {
- set nodes($rootNode,$dir) [incr nodes(count)]
- $tree insert end $node $nodes($rootNode,$dir) -drawcross allways -image [BWidget::Icon folder16] -text [file tail $dir] -data $dir
- }
- }
-
- set opts [list -open 1 -image [BWidget::Icon folderopen16]]
-
- if {!$found} { lappend opts -drawcross never }
- eval [list $tree itemconfigure $node] $opts
- }
-
-
- proc ChooseDirectory::_close_directory { path tree node } {
- $tree itemconfigure $node -image [BWidget::Icon folder16]
- }
-
-
- proc ChooseDirectory::_next_directory { root text } {
- set i 1
- set dir [file join $root $text]
- while {[file exists $dir]} {
- set dir [file join $root "$text ([incr i])"]
- }
- return $dir
- }
-
-
- proc ChooseDirectory::_create_directory { path tree } {
- Widget::getVariable $path root
- Widget::getVariable $path#choosedir nodes
-
- set sel [lindex [$tree selection get] 0]
- $tree itemconfigure $sel -open 1
-
- set text [_next_directory $root "New Folder"]
- set i [$tree insert end $sel new#auto -text [file tail $text] -image [BWidget::Icon folder16]]
-
- $tree edit $i [file tail $text] [list ChooseDirectory::_verify_directory $path $tree $i] 1
-
- set dir [file join $root [$tree itemcget $i -text]]
-
- set parent [$tree parent $sel]
- set rootNode $sel
- while {$parent ne "root"} {
- set rootNode $parent
- set parent [$tree parent $parent]
- }
-
- set nodes($rootNode,$dir) [incr nodes(count)]
- set node $nodes($rootNode,$dir)
-
- $tree delete $i
- $tree insert end $sel $node -text [file tail $dir] -data $dir -image [BWidget::Icon folder16]
-
- _select_directory $path $tree $node
-
- file mkdir $dir
- }
-
-
- proc ChooseDirectory::_verify_directory { path tree node newtext } {
- Widget::getVariable $path root
-
- set txt [$tree itemcget $node -text]
- if {![string length $newtext]} { set newtext $txt }
-
- set dir [file join $root $newtext]
-
- if {[file exists $dir]} {
- set title "Error Renaming File or Folder"
- set msg "Cannot rename $txt: A file with the name you specified "
- append msg "already exists. Specify a different file name."
- tk_messageBox -icon error -title $title -message $msg
- return 0
- }
-
- $tree itemconfigure $node -text $newtext
- return 1
- }
-
-
- proc ChooseDirectory::_update_ok_button { path {really 0} } {
- if {[Widget::exists $path]} {
- if {!$really} {
- after idle [concat [info level 0] 1]
- } else {
- Widget::getVariable $path root
- Widget::getVariable $path tail
- set len [llength [file split $root]]
- if {[string trim $tail] eq "" && $len > 1} {
- ButtonBox::itemconfigure $path.bbox 1 -state disabled
- } else {
- ButtonBox::itemconfigure $path.bbox 1 -state normal
- }
- }
- }
- }
-
-
- proc ChooseDirectory::_destroy { path } {
- Widget::destroy $path#choosedir
- Widget::destroy $path
- }
-
-
- namespace eval MessageDlg {
- Widget::define MessageDlg messagedlg Dialog
-
- Widget::tkinclude MessageDlg label .frame.msg remove {
- -cursor -highlightthickness -relief -borderwidth -bd
- -takefocus -textvariable
- } rename {
- -text -message
- } initialize {
- -anchor w -justify left
- }
-
- Widget::bwinclude MessageDlg Dialog :cmd remove {
- -modal -image -bitmap -side -anchor -separator
- -homogeneous -padx -pady -spacing
- }
-
- Widget::declare MessageDlg {
- {-name String "" 0}
- {-icon Enum "info" 0 {none error info question warning}}
- {-type Enum "user" 0
- {abortretryignore ok okcancel retrycancel yesno yesnocancel user}}
- {-buttons String "" 0}
- {-buttonwidth String 0 0}
- {-usenative Boolean 1 0}
- }
-
- Widget::addmap MessageDlg "" tkMBox {
- -parent {} -message {} -default {} -title {}
- }
- }
-
-
- proc MessageDlg::create { path args } {
- variable dialogs
-
- array set _args $args
-
- if {[info exists _args(-name)] && [info exists dialogs($_args(-name))]} {
- return $dialogs($_args(-name))
- }
-
- BWidget::LoadBWidgetIconLibrary
-
- set dialog "$path#Message"
-
- Widget::initArgs MessageDlg $args maps
- Widget::initFromODB MessageDlg $dialog $maps(MessageDlg)
-
- set type [Widget::getoption $dialog -type]
- set icon [Widget::getoption $dialog -icon]
- set width [Widget::getoption $dialog -buttonwidth]
- set native [Widget::getoption $dialog -usenative]
-
- set user 0
- set defb -1
- set canb -1
- switch -- $type {
- abortretryignore {set lbut {abort retry ignore}; set defb 0}
- ok {set lbut {ok}; set defb 0 }
- okcancel {set lbut {ok cancel}; set defb 0; set canb 1}
- retrycancel {set lbut {retry cancel}; set defb 0; set canb 1}
- yesno {set lbut {yes no}; set defb 0; set canb 1}
- yesnocancel {set lbut {yes no cancel}; set defb 0; set canb 2}
- user {
- set user 1
- set native 0
- set lbut [Widget::cget $dialog -buttons]
- }
- }
-
- array set dialogArgs $maps(:cmd)
-
- if {!$user && ![info exists dialogArgs(-default)]} {
- lappend maps(:cmd) -default [lindex $lbut $defb]
- lappend maps(tkMBox) -default [lindex $lbut $defb]
- }
-
- if {![info exists dialogArgs(-cancel)]} {
- lappend maps(:cmd) -cancel $canb
- }
-
- if {![info exists dialogArgs(-title)]} {
- set frame [frame $path -class MessageDlg]
- set title [option get $frame "${icon}Title" MessageDlg]
- destroy $frame
- if {![string length $title]} {
- set title "Message"
- }
- lappend maps(:cmd) -title $title
- lappend maps(tkMBox) -title $title
- }
-
- set name [Widget::getoption $dialog -name]
- if {[string length $name]} { set native 0 }
-
- if {!$native} {
- if {!$user && !$width} { set width 12 }
-
- set image ""
- if {![string equal $icon "none"]} {
- set image [BWidget::Icon dialog$icon]
- }
-
- eval [list Dialog::create $path] $maps(:cmd) [list -image $image -modal local -side bottom -anchor c]
- wm resizable $path 0 0
-
- bind $path <Key-Left> [list MessageDlg::_key_traversal $path left]
- bind $path <Key-Right> [list MessageDlg::_key_traversal $path right]
-
- foreach but $lbut {
- Dialog::add $path -text $but -name $but -width $width
- }
-
- set frame [Dialog::getframe $path]
-
- eval [list label $frame.msg] $maps(.frame.msg) -relief flat -bd 0 -highlightthickness 0 -wraplength 800
-
- pack $frame.msg -fill both -expand 1 -padx {5 10} -pady {5 0}
-
- if {[string length $name]} {
- set msg "Don't ask me again"
- set varName [Widget::widgetVar $dialog dontAskAgain]
- if {[BWidget::using ttk]} {
- ttk::checkbutton $path.check -text $msg -variable $varName
- } else {
- checkbutton $path.check -text $msg -variable $varName
- }
-
- pack $path.check -anchor w -side bottom -pady {0 2}
-
- bind $path.bbox <Map> [list pack configure $path.bbox -pady 5]
- }
-
- set res [Dialog::draw $path]
- if {!$user} { set res [lindex $lbut $res] }
-
- destroy $path
- } else {
- array set tkMBoxArgs $maps(tkMBox)
-
- if {![string equal $icon "none"]} {
- set tkMBoxArgs(-icon) $icon
- }
-
- if {[info exists tkMBoxArgs(-parent)]
- && ![winfo exists $tkMBoxArgs(-parent)]} {
- unset tkMBoxArgs(-parent)
- }
-
- set tkMBoxArgs(-type) $type
- set res [eval tk_messageBox [array get tkMBoxArgs]]
- }
-
- if {[string length $name]} {
- upvar #0 $varName var
- if {$var} { set dialogs($name) $res }
- }
-
- Widget::destroy $dialog
-
- return $res
- }
-
-
- proc MessageDlg::_key_traversal { path dir } {
- set but [focus -lastfor $path]
- if {$but eq $path} {
- set def [ButtonBox::index $path.bbox default]
- set but [ButtonBox::index $path.bbox $def]
- ButtonBox::configure $path.bbox -default -1
- }
-
- set idx [ButtonBox::index $path.bbox $but]
- set max [ButtonBox::index $path.bbox end]
-
- if {$dir eq "left"} { incr idx -1 }
- if {$dir eq "right"} { incr idx 1 }
-
- if {$idx < 0} { set idx $max }
- if {$idx > $max} { set idx 0 }
-
- focus [ButtonBox::buttons $path.bbox $idx]
- }
-
-
- namespace eval Wizard {
- Widget::define Wizard wizard ButtonBox Separator
-
- namespace eval Step {
- Widget::declare Wizard::Step {
- {-background Color2 "" 0 }
- {-type String "step" 1 }
- {-data String "" 0 }
- {-title String "" 0 }
- {-default String "next" 0 }
-
- {-text1 String "" 0 }
- {-text2 String "" 0 }
- {-text3 String "" 0 }
- {-text4 String "" 0 }
- {-text5 String "" 0 }
-
- {-icon String "" 0 }
- {-image String "" 0 }
-
- {-bitmap String "" 0 }
- {-iconbitmap String "" 0 }
-
- {-createstep Boolean2 "" 1 }
- {-appendorder Boolean "1" 0 }
-
- {-nexttext String "" 0 }
- {-backtext String "" 0 }
- {-helptext String "" 0 }
- {-canceltext String "" 0 }
- {-finishtext String "" 0 }
- {-separatortext String "" 0 }
-
- {-separator Boolean2 "" 0 }
-
- {-command String "" 0 }
-
- {-createcommand String "" 0 }
- {-raisecommand String "" 0 }
- {-nextcommand String "" 0 }
- {-backcommand String "" 0 }
- {-helpcommand String "" 0 }
- {-cancelcommand String "" 0 }
- {-finishcommand String "" 0 }
-
- {-compoundraise Boolean "1" 0 }
- {-compoundcreate Boolean "1" 0 }
-
- {-bg Synonym -background }
- }
- }
-
- namespace eval Branch {
- Widget::declare Wizard::Branch {
- {-type String "branch" 1 }
- {-command String "" 0 }
- {-action Enum "merge" 0 {merge terminate} }
- }
- }
-
- namespace eval Widget {
- Widget::declare Wizard::Widget {
- {-type String "widget" 1 }
- {-step String "" 1 }
- {-widget String "" 1 }
- }
- }
-
- namespace eval layout {}
-
- Widget::tkinclude Wizard frame :cmd include { -background -foreground -cursor }
-
- Widget::declare Wizard {
- {-type Enum "dialog" 1 {dialog frame} }
- {-width TkResource "475" 0 frame}
- {-height TkResource "350" 0 frame}
- {-relief TkResource "flat" 0 frame}
- {-borderwidth TkResource "0" 0 frame}
- {-background Color "SystemButtonFace" 0}
- {-foreground String "black" 0 }
- {-title String "Wizard" 0 }
- {-createstep Boolean "0" 0 }
-
- {-autobuttons Boolean "1" 0 }
- {-helpbutton Boolean "0" 1 }
- {-finishbutton Boolean "0" 1 }
- {-resizable String "0 0" 0 }
- {-separator Boolean "1" 1 }
- {-parent String "." 1 }
- {-transient Boolean "1" 1 }
- {-place Enum "center" 1
- {none center left right above below} }
-
- {-icon String "" 0 }
- {-image String "" 0 }
-
- {-bitmap String "" 0 }
- {-iconbitmap String "" 0 }
-
- {-raisecommand String "" 0 }
- {-createcommand String "" 0 }
-
- {-buttonwidth Int "12" 0 }
- {-nexttext String "Next >" 0 }
- {-backtext String "< Back" 0 }
- {-helptext String "Help" 0 }
- {-canceltext String "Cancel" 0 }
- {-finishtext String "Finish" 0 }
- {-separatortext String "" 0 }
-
- {-fg Synonym -foreground }
- {-bg Synonym -background }
- {-bd Synonym -borderwidth }
- }
-
- image create photo Wizard::none
-
- Widget::addmap Wizard "" :cmd { -background {} -relief {} -borderwidth {} }
-
- bind Wizard <Destroy> [list Wizard::_destroy %W]
- }
-
-
- proc Wizard::create { path args } {
- Widget::initArgs Wizard $args maps
-
- Widget::initFromODB Wizard $path $maps(Wizard)
-
- Widget::getVariable $path data
- Widget::getVariable $path branches
-
- array set data {
- steps ""
- buttons ""
- order ""
- current ""
- }
-
- array set branches {
- root ""
- }
-
- set frame $path
-
- set type [Widget::getoption $path -type]
-
- if {[string equal $type "dialog"]} {
- set top $path
- eval [list toplevel $path -bg $::BWidget::colors(SystemButtonFace)] $maps(:cmd) -class Wizard
- wm withdraw $path
- update idletasks
- wm protocol $path WM_DELETE_WINDOW [list $path cancel 1]
- if {[Widget::getoption $path -transient]} {
- wm transient $path [Widget::getoption $path -parent]
- }
- eval wm resizable $path [Widget::getoption $path -resizable]
-
- set width [Widget::cget $path -width]
- set height [Widget::cget $path -height]
- wm geometry $top ${width}x${height}
-
- bind $path <Escape> [list $path cancel]
- bind $path <<WizardFinish>> [list destroy $path]
- bind $path <<WizardCancel>> [list destroy $path]
- } else {
- set top [winfo toplevel $path]
- eval [list frame $path] $maps(:cmd) -class Wizard
- }
-
- wm title $top [Widget::getoption $path -title]
-
- grid rowconfigure $top 0 -weight 1
- grid columnconfigure $top 0 -weight 1
-
- frame $path.steps
- grid $path.steps -row 0 -column 0 -sticky news
-
- grid rowconfigure $path.steps 0 -weight 1
- grid columnconfigure $path.steps 0 -weight 1
-
- widget $path set steps -widget $path.steps
-
- if {[Widget::getoption $path -separator]} {
- frame $path.separator
- grid $path.separator -row 1 -column 0 -sticky ew -pady [list 5 0]
-
- grid columnconfigure $path.separator 1 -weight 1
-
- label $path.separator.l -bd 0 -pady 0 -state disabled -text [Widget::getoption $path -separatortext]
- grid $path.separator.l -row 0 -column 0 -sticky sw -padx 2
-
- Separator $path.separator.s -orient horizontal
- grid $path.separator.s -row 0 -column 1 -sticky sew -padx [list 0 5] -pady 4
-
- widget $path set separator -widget $path.separator.s
- widget $path set separatortext -widget $path.separator.l
- widget $path set separatorframe -widget $path.separator
- }
-
- ButtonBox $path.buttons -spacing 2 -homogeneous 1
- grid $path.buttons -row 2 -column 0 -sticky e -padx 5 -pady {10 5}
-
- widget $path set buttons -widget $path.buttons
-
- Wizard::insert $path button end back -text "< Back" -command [list $path back 1] -width [Widget::getoption $path -buttonwidth]
- Wizard::insert $path button end next -text "Next >" -command [list $path next 1]
- if {[Widget::getoption $path -finishbutton]} {
- Wizard::insert $path button end finish -text "Finish" -command [list $path finish 1]
- }
- Wizard::insert $path button end cancel -text "Cancel" -command [list $path cancel 1] -spacing 10
-
- if {[Widget::getoption $path -helpbutton]} {
- Wizard::insert $path button 0 help -text "Help" -command [list $path help 1] -spacing 10
- }
-
- return [Widget::create Wizard $path]
- }
-
-
- proc Wizard::configure { path args } {
- set res [Widget::configure $path $args]
-
- if {[Widget::hasChanged $path -title title]} {
- wm title [winfo toplevel $path] $title
- }
-
- if {[Widget::hasChanged $path -resizable resize]} {
- eval wm resizable [winfo toplevel $path] $resize
- }
-
- if {[Widget::getoption $path -separator]
- && [Widget::hasChanged $path -separatortext text]} {
- set text [Wizard::getoption $path [Wizard::raise $path] -separatortext]
- Wizard::itemconfigure $path separatortext -text $text
- }
-
-
- if {[Widget::anyChangedX $path -width -height]} {
- set type [Widget::getoption $path -type]
- set width [Widget::cget $path -width]
- set height [Widget::cget $path -height]
-
- if {[string equal $type "dialog"]} {
- wm geometry $path ${width}x${height}
- } else {
- $path:cmd configure -width $width -height $height
- }
- }
-
- return $res
- }
-
-
- proc Wizard::cget { path option } {
- return [Widget::cget $path $option]
- }
-
-
- proc Wizard::itemcget { path item option } {
- Widget::getVariable $path items
- Widget::getVariable $path steps
- Widget::getVariable $path buttons
- Widget::getVariable $path widgets
-
- if {[Wizard::_is_step $path $item]} {
- return [Widget::cget $items($item) $option]
- }
-
- if {[Wizard::_is_branch $path $item]} {
- return [Widget::cget $items($item) $option]
- }
-
- if {[Wizard::_is_button $path $item]} {
- return [$path.buttons itemcget $items($item) $option]
- }
-
- if {[Wizard::_is_widget $path $item]} {
- return [eval [$path widget get $item] cget $option]
- }
-
- return -code error "item \"$item\" does not exist"
- }
-
-
- proc Wizard::itemconfigure { path item args } {
- Widget::getVariable $path items
- Widget::getVariable $path steps
- Widget::getVariable $path buttons
-
- if {[Wizard::_is_step $path $item]} {
- set res [Widget::configure $items($item) $args]
-
- if {$item eq [Wizard::step $path current]} {
- if {[Widget::hasChanged $items($item) -title title]} {
- set title [Wizard::getoption $path $item -title]
- wm title [winfo toplevel $path] $title
- }
-
- if {[Widget::getoption $path -separator]
- && [Widget::hasChanged $items($item) -separator separator]} {
- if {[Wizard::getoption $path $item -separator]} {
- grid $path.separator.s
- } else {
- grid remove $path.separator.s
- }
- }
-
- if {[Widget::getoption $path -separator]
- && [Widget::hasChanged $items($item) -separatortext text]} {
- set text [Wizard::getoption $path $item -separatortext]
- Wizard::itemconfigure $path separatortext -text $text
- }
-
- set x [list -nexttext -backtext -canceltext -helptext -finishtext]
- if {[eval [list Widget::anyChangedX $path] $x]} {
- Wizard::adjustbuttons $path
- }
- }
-
- return $res
- }
-
- if {[Wizard::_is_branch $path $item]} {
- return [Widget::configure $items($item) $args]
- }
-
- if {[Wizard::_is_button $path $item]} {
- return [eval $path.buttons itemconfigure [list $items($item)] $args]
- }
-
- if {[Wizard::_is_widget $path $item]} {
- return [eval [Wizard::widget $path get $item] configure $args]
- }
-
- return -code error "item \"$item\" does not exist"
- }
-
-
- proc Wizard::show { path } {
- wm deiconify [winfo toplevel $path]
- }
-
-
- proc Wizard::hide { path } {
- wm withdraw [winfo toplevel $path]
- }
-
-
- proc Wizard::invoke { path button } {
- Widget::getVariable $path buttons
- if {![info exists buttons($button)]} {
- return -code error "button \"$button\" does not exist"
- }
- [Wizard::widget $path get $button] invoke
- }
-
-
- proc Wizard::insert { path type idx args } {
- switch -- $type {
- "button" {
- set node [lindex $args 0]
- set node [Widget::nextIndex $path $node]
- set args [lreplace $args 0 0 $node]
- }
-
- "step" - "branch" {
- set node [lindex $args 1]
- set branch [lindex $args 0]
- set node [Widget::nextIndex $path $node]
- set args [lreplace $args 1 1 $node]
-
- if {![Wizard::_is_branch $path $branch]} {
- return -code error "branch \"$branch\" does not exist"
- }
- }
-
- default {
- set types [list button branch step]
- set err [BWidget::badOptionString option $type $types]
- return -code error $err
- }
- }
-
- if {[Wizard::exists $path $node]} {
- return -code error "item \"$node\" already exists"
- }
-
- eval _insert_$type $path $idx $args
-
- return $node
- }
-
-
- proc Wizard::delete { path args } {
- Widget::getVariable $path data
- Widget::getVariable $path items
- Widget::getVariable $path steps
- Widget::getVariable $path buttons
- Widget::getVariable $path widgets
- Widget::getVariable $path branches
-
- set step [Wizard::step $path current]
- foreach item $args {
- set item [Wizard::step $path $item]
- if {![string length $item]} { continue }
-
- if {[Wizard::_is_step $path $item]} {
-
- set branch [Wizard::branch $path $item]
- set x [lsearch -exact $branches($branch) $item]
- set branches($branch) [lreplace $branches($branch) $x $x]
-
- destroy $widgets($item)
-
- Widget::destroy $items($item) 0
-
- unset steps($item)
- unset data($item,branch)
- unset items($item)
- unset widgets($item)
-
- if {[info exists data($item,realized)]} {
- unset data($item,realized)
- }
-
- if {$item eq $step} { set data(current) "" }
- }
-
- if {[Wizard::_is_branch $path $item]} {
-
- set branch [Wizard::branch $path $item]
- set x [lsearch -exact $branches($branch) $item]
- set branches($branch) [lreplace $branches($branch) $x $x]
-
- Widget::destroy $items($item) 0
-
- unset branches($item)
- unset data($item,branch)
- unset items($item)
- }
-
- if {[info exists buttons($item)]} {
-
- set x [$path.buttons index $widgets($item)]
- $path.buttons delete $x
-
- unset items($item)
- unset buttons($item)
- unset widgets($item)
- }
- }
- }
-
-
- proc Wizard::back { path {generateEvent 0} {executeCommand 1} } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- set step [Wizard::raise $path]
-
- if {$executeCommand && [string length $step]} {
- set cmd [Widget::getoption $items($step) -backcommand]
- if {![_eval_command $path $cmd]} { return }
- }
-
- if {$step ne [Wizard::raise $path]} { return }
-
- set idx [lsearch -exact $data(order) $step]
- if {$idx < 0} {
- set item [lindex $data(order) end]
- } else {
- set item [lindex $data(order) [expr {$idx - 1}]]
- set data(order) [lreplace $data(order) $idx end]
- }
-
- Wizard::raise $path $item $generateEvent
-
- if {$generateEvent} { event generate $path <<WizardBack>> }
-
- return $item
- }
-
-
- proc Wizard::next { path {generateEvent 0} {executeCommand 1} } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- set step [Wizard::raise $path]
-
- if {$executeCommand && [string length $step]} {
- set cmd [Widget::getoption $items($step) -nextcommand]
- if {![_eval_command $path $cmd]} { return }
- }
-
- if {$step ne [Wizard::raise $path]} { return }
-
- set item [Wizard::step $path next]
- if {![string length $item]} { return }
-
- if {[Widget::getoption $items($item) -appendorder]} {
- lappend data(order) $item
- }
-
- Wizard::raise $path $item $generateEvent
-
- if {$generateEvent} { event generate $path <<WizardNext>> }
-
- return $item
- }
-
-
- proc Wizard::cancel { path {generateEvent 0} {executeCommand 1} } {
- Widget::getVariable $path items
-
- set step [Wizard::raise $path]
-
- if {$executeCommand && [string length $step]} {
- set cmd [Widget::getoption $items($step) -cancelcommand]
- if {![_eval_command $path $cmd]} { return }
- }
-
- if {$generateEvent} { event generate $path <<WizardCancel>> }
- }
-
-
- proc Wizard::finish { path {generateEvent 0} {executeCommand 1} } {
- Widget::getVariable $path items
-
- set step [Wizard::raise $path]
-
- if {$executeCommand && [string length $step]} {
- set cmd [Widget::getoption $items($step) -finishcommand]
- if {![_eval_command $path $cmd]} { return }
- }
-
- if {$generateEvent} { event generate $path <<WizardFinish>> }
- }
-
-
- proc Wizard::help { path {generateEvent 0} {executeCommand 1} } {
- Widget::getVariable $path items
-
- set step [Wizard::raise $path]
-
- if {$executeCommand && [string length $step]} {
- set cmd [Widget::getoption $items($step) -helpcommand]
- if {![_eval_command $path $cmd]} { return }
- }
-
- if {$generateEvent} { event generate $path <<WizardHelp>> }
- }
-
-
- proc Wizard::order { path args } {
- Widget::getVariable $path data
- if {[llength $args] > 1} {
- set err [BWidget::wrongNumArgsString "$path order ?neworder?"]
- return -code error $err
- }
- if {[llength $args]} { set data(order) [lindex $args 0] }
- return $data(order)
- }
-
-
- proc Wizard::step { path node {start ""} {traverse 1} } {
- Widget::getVariable $path data
- Widget::getVariable $path items
- Widget::getVariable $path branches
-
- if {[string length $start] && ![info exists items($start)]} {
- return -code error "item \"$start\" does not exist"
- }
-
- switch -- $node {
- "current" {
- set item [Wizard::raise $path]
- }
-
- "end" - "last" {
- set item [Wizard::step $path next]
- while {[string length $item]} {
- set last $item
- set item [Wizard::step $path next $item]
- }
- set item $last
- }
-
- "back" - "previous" {
- if {![string length $start]} { set start [Wizard::raise $path] }
-
- set idx [lsearch -exact $data(order) $start]
- if {$idx < 0} {
- set item [lindex $data(order) end]
- } else {
- incr idx -1
- if {$idx < 0} { return }
- set item [lindex $data(order) $idx]
- }
- }
-
- "next" {
- if {[string length $start]} {
- set step $start
- } else {
- set step [Wizard::raise $path]
- }
-
- set branch [Wizard::branch $path $step]
- if {$traverse && [Wizard::_is_branch $path $step]} {
- if {[Wizard::traverse $path $step]} {
- set branch $step
- }
- }
-
- set idx [expr {[lsearch -exact $branches($branch) $step] + 1}]
-
- if {$idx >= [llength $branches($branch)]} {
- if {$branch eq "root"
- || [Widget::getoption $items($branch) -action]
- eq "terminate"} {
- return
- }
-
- set item [Wizard::step $path next $branch 0]
- } else {
- set item [lindex $branches($branch) $idx]
-
- if {[Wizard::_is_branch $path $item]} {
- if {$traverse} {
- set item [Wizard::step $path next $item]
- }
- } else {
- if {![Wizard::traverse $path $item]} {
- set item [Wizard::step $path next $item]
- }
- }
- }
- }
-
- default {
- set item ""
-
- if {[Wizard::_is_branch $path $node]} {
- return [Wizard::step $path next $node]
- }
-
- if {[Wizard::_is_step $path $node]} { set item $node }
- }
- }
-
- return $item
- }
-
-
- proc Wizard::nodes { path branch {first ""} {last ""} } {
- Widget::getVariable $path data
- Widget::getVariable $path branches
- if {![string length $first]} { return $branches($branch) }
- if {![string length $last]} { return [lindex $branches($branch) $first] }
- return [lrange $branches($branch) $first $last]
- }
-
-
- proc Wizard::index { path item } {
- Widget::getVariable $path branches
- set item [$path step $item]
- set branch [$path branch $item]
- return [lsearch -exact $branches($branch) $item]
- }
-
-
- proc Wizard::raise { path {item ""} {generateEvent 0} } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- set steps $path.steps
- set buttons $path.buttons
-
- if {[string equal $item ""]} { return $data(current) }
-
- set x $item
- set curr $data(current)
- set item [Wizard::step $path $item]
-
- if {![string length $item]} {
- return -code error "step \"$x\" does not exist"
- }
-
- if {[string equal $item $data(current)]} { return }
-
- Wizard::createstep $path $item
-
- if {[Widget::getoption $items($item) -compoundraise]} {
- set cmd [Widget::getoption $path -raisecommand]
- Wizard::_eval_command $path $cmd $item
- }
-
- if {$data(current) ne $curr} { return $data(current) }
-
- set cmd [Widget::getoption $items($item) -raisecommand]
- Wizard::_eval_command $path $cmd $item
-
- if {$data(current) ne $curr} { return $data(current) }
-
- wm title [winfo toplevel $path] [Wizard::getoption $path $item -title]
-
- if {[Wizard::getoption $path $item -separator]} {
- grid $path.separator.s
- set text [Wizard::getoption $path $item -separatortext]
- $path itemconfigure separatortext -text $text
- } else {
- grid remove $path.separator.s
- $path itemconfigure separatortext -text ""
- }
-
- set default [Widget::getoption $items($item) -default]
- set button [lsearch -exact $data(buttons) $default]
- $buttons setfocus $button
-
- if {[string length $data(current)]} {
- grid remove $steps.f$data(current)
- }
-
- set data(current) $item
-
- grid $steps.f$data(current) -row 0 -column 0 -sticky news
-
- set back [Wizard::step $path back]
- set next [Wizard::step $path next]
-
- if {[Widget::getoption $path -autobuttons]} { Wizard::adjustbuttons $path }
-
- if {$generateEvent} {
- if {$back eq ""} { event generate $path <<WizardFirstStep>> }
- if {$next eq ""} { event generate $path <<WizardLastStep>> }
- event generate $path <<WizardStep>>
- }
-
- return $item
- }
-
-
- proc Wizard::adjustbuttons { path } {
- Widget::getVariable $path items
-
- set item [Wizard::step $path current]
- if {[string equal $item ""]} { return }
-
- set back [Wizard::step $path back]
- set next [Wizard::step $path next]
-
- foreach x [list back next cancel] {
- set text [Wizard::getoption $path $item -${x}text]
- $path itemconfigure $x -text $text -state normal
- }
-
- if {[Widget::getoption $path -helpbutton]} {
- set text [Wizard::getoption $path $item -helptext]
- $path itemconfigure help -text $text
- }
-
- if {[Widget::getoption $path -finishbutton]} {
- set text [Wizard::getoption $path $item -finishtext]
- $path itemconfigure finish -text $text -state disabled
- }
-
- if {[string equal $back ""]} {
- $path itemconfigure back -state disabled
- }
-
- if {[string equal $next ""]} {
- if {[Widget::getoption $path -finishbutton]} {
- $path itemconfigure next -state disabled
- $path itemconfigure finish -state normal
- } else {
- set text [Wizard::getoption $path $item -finishtext]
- $path itemconfigure next -text $text -command [list $path finish 1]
- }
- $path itemconfigure back -state disabled
- $path itemconfigure cancel -state disabled
- } else {
- set text [Wizard::getoption $path $item -nexttext]
- $path itemconfigure next -text $text -command [list $path next 1]
- }
- }
-
-
- proc Wizard::widget { path command args } {
- return [eval [list Wizard::widgets $path $command] $args]
- }
-
-
- proc Wizard::widgets { path command args } {
- Widget::getVariable $path items
- Widget::getVariable $path widgets
- Widget::getVariable $path stepWidgets
-
- switch -- $command {
- "set" {
- set node [lindex $args 0]
- if {[string equal $node ""]} {
- set str "$path widget set <name> ?option ..?"
- set err [BWidget::wrongNumArgsString $str]
- return -code error $err
- }
- set args [lreplace $args 0 0]
- set item $path.#widget#$node
-
- Widget::init Wizard::Widget $item $args
- set step [Widget::getoption $item -step]
- set widget [Widget::getoption $item -widget]
- set items($node) $item
- if {[string equal $step ""]} {
- set widgets($node) $widget
- } else {
- set stepWidgets($step,$node) $widget
- }
- return $widget
- }
-
- "get" {
- set widget [lindex $args 0]
- if {[string equal [string index $widget 0] "-"]} {
- set widget ""
- } else {
- set args [lreplace $args 0 0]
- }
-
- array set map [list Wizard::Widget {}]
- array set map [Widget::parseArgs Wizard::Widget $args]
- array set data $map(Wizard::Widget)
-
- if {[info exists data(-step)]} {
- set step $data(-step)
-
- if {[string equal $widget ""]} {
- set list [list]
- foreach name [array names stepWidgets $step,*] {
- set x [lrange [split $name ,] 1 end]
- lappend list [eval join $x ,]
- }
- return $list
- }
- } else {
- if {[string equal $widget ""]} {
- return [array names widgets]
- }
-
- set step [$path step current]
- }
-
- if {[info exists stepWidgets($step,$widget)]} {
- return $stepWidgets($step,$widget)
- }
-
- if {![info exists widgets($widget)]} {
- return -code error "item \"$widget\" does not exist"
- }
-
- return $widgets($widget)
- }
-
- default {
- set err [BWidget::badOptionString option $command [list get set]]
- return -code error $err
- }
- }
- }
-
-
- proc Wizard::variable { path step option } {
- set item [step $path $step]
- if {[string equal $item ""]} {
- return -code error "item \"$step\" does not exist"
- }
- set item $path.$item
- return [Widget::varForOption $item $option]
- }
-
-
- proc Wizard::branch { path {node "current"} } {
- Widget::getVariable $path data
-
- if {[_is_branch $path $node]} { return $data($node,branch) }
-
- set node [$path step $node]
- if {[string equal $node ""]} { return "root" }
- if {[info exists data($node,branch)]} { return $data($node,branch) }
- return -code error "item \"$node\" does not exist"
- }
-
-
- proc Wizard::traverse { path node } {
- Widget::getVariable $path items
-
- if {$node eq "root"} { return 1 }
-
- if {![info exists items($node)]} {
- return -code error "node \"$node\" does not exist"
- }
-
- set cmd [Widget::getoption $items($node) -command]
- return [_eval_command $path $cmd]
- }
-
-
- proc Wizard::exists { path item } {
- Widget::getVariable $path items
- return [info exists items($item)]
- }
-
-
- proc Wizard::createstep { path item {delete 0} } {
- Widget::getVariable $path data
- Widget::getVariable $path items
-
- set item [Wizard::step $path $item]
-
- if {![Wizard::_is_step $path $item]} { return }
-
- if {$delete} {
- if {[winfo exists $path.f$item]} {
- destroy $path.f$item
- }
- if {[info exists data($item,realized)]} {
- unset data($item,realized)
- }
- }
-
- if {![info exists data($item,realized)]} {
- set data($item,realized) 1
-
- if {[Widget::getoption $items($item) -compoundcreate]} {
- set cmd [Widget::getoption $path -createcommand]
- _eval_command $path $cmd $item
- }
-
- set cmd [Widget::getoption $items($item) -createcommand]
- _eval_command $path $cmd $item
- }
-
- return $item
- }
-
-
- proc Wizard::getoption { path item option } {
- Widget::getVariable $path items
- set step [Wizard::step $path $item]
- if {![string length $step]} {
- return -code error "item \"$item\" does not exist"
- }
- return [Widget::cgetOption $option "" $items($step) $path]
- }
-
-
- proc Wizard::reorder { path parent nodes } {
- Widget::getVariable $path branches
- set branches($parent) $nodes
- if {[Widget::getoption $path -autobuttons]} { Wizard::adjustbuttons $path }
- }
-
-
- proc Wizard::_insert_button { path idx node args } {
- Widget::getVariable $path data
- Widget::getVariable $path items
- Widget::getVariable $path buttons
- Widget::getVariable $path widgets
-
- set buttons($node) 1
- set widgets($node) [eval $path.buttons insert $idx $args]
- set item [string map [list $path.buttons.b {}] $widgets($node)]
- set items($node) $item
- return $widgets($node)
- }
-
-
- proc Wizard::_insert_step { path idx branch node args } {
- Widget::getVariable $path data
- Widget::getVariable $path steps
- Widget::getVariable $path items
- Widget::getVariable $path widgets
- Widget::getVariable $path branches
-
- set steps($node) 1
- set data($node,branch) $branch
- if {$idx eq "end"} {
- lappend branches($branch) $node
- } else {
- set branches($branch) [linsert $branches($branch) $idx $node]
- }
-
- Widget::init Wizard::Step $path.$node $args
-
- set items($node) $path.$node
- set bg [Wizard::getoption $path $node -background]
-
- set widgets($node) [frame $path.steps.f$node -bg $bg]
-
- if {[getoption $path $node -createstep]} { Wizard::createstep $path $node }
-
- if {[Widget::getoption $path -autobuttons]} { Wizard::adjustbuttons $path }
-
- return $widgets($node)
- }
-
-
- proc Wizard::_insert_branch { path idx branch node args } {
- Widget::getVariable $path data
- Widget::getVariable $path items
- Widget::getVariable $path branches
-
- set branches($node) [list]
- set data($node,branch) $branch
- if {$idx eq "end"} {
- lappend branches($branch) $node
- } else {
- set branches($branch) [linsert $branches($branch) $idx $node]
- }
-
- Widget::init Wizard::Branch $path.$node $args
-
- if {[Widget::getoption $path -autobuttons]} { Wizard::adjustbuttons $path }
-
- set items($node) $path.$node
-
- return $items($node)
- }
-
-
- proc Wizard::_is_step { path node } {
- Widget::getVariable $path steps
- return [info exists steps($node)]
- }
-
-
- proc Wizard::_is_branch { path node } {
- Widget::getVariable $path branches
- return [info exists branches($node)]
- }
-
-
- proc Wizard::_is_button { path node } {
- Widget::getVariable $path buttons
- return [info exists buttons($node)]
- }
-
-
- proc Wizard::_is_widget { path node } {
- Widget::getVariable $path widgets
- return [info exists widgets($node)]
- }
-
-
- proc Wizard::_eval_command { path command {step ""} } {
- if {![string length $command]} { return 1 }
-
- if {![string length $step]} { set step [Wizard::raise $path] }
-
- set map [list %W $path %S $step]
-
- if {![Wizard::_is_branch $path $step]} {
- if {[string match "*%B*" $command]} {
- lappend map %B [Wizard::branch $path $step]
- }
-
- if {[string match "*%n*" $command]} {
- lappend map %n [Wizard::step $path next $step]
- }
-
- if {[string match "*%b*" $command]} {
- lappend map %b [Wizard::step $path back $step]
- }
- }
-
- return [uplevel #0 [string map $map $command]]
- }
-
-
- proc Wizard::_destroy { path } {
- Widget::getVariable $path items
-
- foreach item [array names items] {
- Widget::destroy $items($item) 0
- }
-
- Widget::destroy $path
- }
-
-
- proc SimpleWizard { path args } {
- option add *WizLayoutSimple*Label.padX 5 interactive
- option add *WizLayoutSimple*Label.anchor nw interactive
- option add *WizLayoutSimple*Label.justify left interactive
- option add *WizLayoutSimple*Label.borderWidth 0 interactive
- option add *WizLayoutSimple*Label.highlightThickness 0 interactive
-
- set args [linsert $args 0 -createstep 1]
- lappend args -createcommand [list Wizard::layout::simple %W %S]
-
- return [eval [list Wizard $path] $args]
- }
-
-
- proc ClassicWizard { path args } {
- option add *WizLayoutClassic*Label.padX 5 interactive
- option add *WizLayoutClassic*Label.anchor nw interactive
- option add *WizLayoutClassic*Label.justify left interactive
- option add *WizLayoutClassic*Label.borderWidth 0 interactive
- option add *WizLayoutClassic*Label.highlightThickness 0 interactive
-
- set args [linsert $args 0 -createstep 1]
- lappend args -createcommand [list Wizard::layout::classic %W %S]
-
- return [eval [list Wizard $path] $args]
- }
-
-
- proc Wizard::layout::simple { wizard step } {
- set frame [$wizard widget get $step]
-
- set layout [$wizard widget set layout -widget $frame.layout -step $step]
-
- foreach w [list titleframe pretext posttext clientArea] {
- set $w [$wizard widget set $w -widget $layout.$w -step $step]
- }
-
- foreach w [list title subtitle icon] {
- set $w [$wizard widget set $w -widget $titleframe.$w -step $step]
- }
-
- frame $layout -class WizLayoutSimple
-
- pack $layout -expand 1 -fill both
-
- frame $clientArea -bd 8 -relief flat
-
- Separator $layout.sep1 -relief groove -orient horizontal
-
- frame $titleframe -bd 4 -relief flat -background white
- label $title -background white -textvariable [$wizard variable $step -text1]
- label $subtitle -height 2 -background white -padx 15 -width 40 -textvariable [$wizard variable $step -text2]
-
- label $icon -borderwidth 0 -background white -anchor c
- set iconImage [$wizard getoption $step -icon]
- if {[string length $iconImage]} { $icon configure -image $iconImage }
-
- set labelfont [font actual [$title cget -font]]
- $title configure -font [concat $labelfont -weight bold]
-
- grid $title -in $titleframe -row 0 -column 0 -sticky nsew
- grid $subtitle -in $titleframe -row 1 -column 0 -sticky nsew
- grid $icon -in $titleframe -row 0 -column 1 -rowspan 2 -padx 8
- grid columnconfigure $titleframe 0 -weight 1
- grid columnconfigure $titleframe 1 -weight 0
-
- label $pretext -textvariable [$wizard variable $step -text3]
- label $posttext -textvariable [$wizard variable $step -text4]
-
- foreach widget [list title subtitle pretext posttext] {
- bind [set $widget] <Configure> {
- after idle {after idle {%W configure -wraplength [expr {%w -10}]}}
- }
- }
-
- grid $titleframe -row 0 -column 0 -sticky nsew -padx 0
- grid $layout.sep1 -row 1 -sticky ew
- grid $pretext -row 2 -sticky nsew -padx 8 -pady 8
- grid $clientArea -row 3 -sticky nsew -padx 8 -pady 8
- grid $posttext -row 4 -sticky nsew -padx 8 -pady 8
-
- grid columnconfigure $layout 0 -weight 1
- grid rowconfigure $layout 0 -weight 0
- grid rowconfigure $layout 1 -weight 0
- grid rowconfigure $layout 2 -weight 0
- grid rowconfigure $layout 3 -weight 1
- grid rowconfigure $layout 4 -weight 0
- }
-
- proc Wizard::layout::classic { wizard step } {
- set frame [$wizard widget get $step]
-
- set layout [$wizard widget set layout -widget $frame.layout -step $step]
- foreach w [list title subtitle icon pretext posttext clientArea] {
- set $w [$wizard widget set $w -widget $layout.$w -step $step]
- }
-
- frame $layout -class WizLayoutClassic
-
- pack $layout -expand 1 -fill both
-
- frame $clientArea -bd 8 -relief flat
-
- Separator $layout.sep1 -relief groove -orient vertical
-
- label $title -textvariable [$wizard variable $step -text1]
- label $subtitle -textvariable [$wizard variable $step -text2] -height 2
-
- array set labelfont [font actual [$title cget -font]]
- incr labelfont(-size) 6
- set labelfont(-weight) bold
- $title configure -font [array get labelfont]
-
- label $pretext -textvariable [$wizard variable $step -text3]
- label $posttext -textvariable [$wizard variable $step -text4]
-
- foreach widget [list title subtitle pretext posttext] {
- bind [set $widget] <Configure> {
- after idle {after idle {%W configure -wraplength [expr {%w -10}]}}
- }
- }
-
- label $icon -borderwidth 1 -relief sunken -background white -anchor c -width 96 -image Wizard::none
- set iconImage [$wizard getoption $step -icon]
- if {[string length $iconImage]} { $icon configure -image $iconImage }
-
- grid $icon -row 0 -column 0 -sticky nsew -padx 8 -pady 8 -rowspan 5
- grid $title -row 0 -column 1 -sticky ew -padx 8 -pady 8
- grid $subtitle -row 1 -column 1 -sticky ew -padx 8 -pady 8
- grid $pretext -row 2 -column 1 -sticky ew -padx 8
- grid $clientArea -row 3 -column 1 -sticky nsew -padx 8
- grid $posttext -row 4 -column 1 -sticky ew -padx 8 -pady 24
-
- grid columnconfigure $layout 0 -weight 0
- grid columnconfigure $layout 1 -weight 1
-
- grid rowconfigure $layout 0 -weight 0
- grid rowconfigure $layout 1 -weight 0
- grid rowconfigure $layout 2 -weight 0
- grid rowconfigure $layout 3 -weight 1
- grid rowconfigure $layout 4 -weight 0
- }
-
-
-
- proc ThemeSetup {} {
- if {$::tcl_platform(platform) ne "windows"} {
- option add *font TkTextFont
- option add *background [style default . -background]
- option add *selectForeground [style default . -selectforeground]
- option add *selectBackground [style default . -selectbackground]
-
- option add *Listbox.background white
-
- option add *Entry.background white
- option add *Entry.borderWidth 1
-
- option add *Text.background white
- }
- }
-
- ThemeSetup
- ThemeInit
- ::InstallJammer::HideMainWindow
- }
- } setup.tcl {proc ::InstallJammer::InitSetup {} {
- FileGroup ::FileGroups
- Component ::Components
- SetupType ::SetupTypes
- FileGroup ::BC9DDC29-8CDB-4C1E-A9F2-F002B44B6E20 -setup Install -type filegroup -active Yes -platforms {Linux-x86 Windows} -name {Program Files} -parent FileGroups
- Component ::25A03054-7BF5-4B4A-A5E8-98C36C53A0F9 -setup Install -type component -active Yes -platforms {Linux-x86 Windows} -name {Default Component} -parent Components
- SetupType ::DC9387EF-9B53-4C8B-AF18-5FDDAD31BD0E -setup Install -type setuptype -active Yes -platforms {Linux-x86 Windows} -name Typical -parent SetupTypes
- SetupType ::4A354C44-1D80-4EFC-991B-1550F2A9E791 -setup Install -type setuptype -active Yes -platforms {Linux-x86 Windows} -name Custom -parent SetupTypes
-
- }} common.tcl ##\ \$Id\$\n##\n##\ Copyright\ (C)\ 2002\ \ Damon\ Courtney\n##\ \n##\ This\ program\ is\ free\ software\;\ you\ can\ redistribute\ it\ and/or\n##\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\n##\ as\ published\ by\ the\ Free\ Software\ Foundation\;\ either\ version\ 2\n##\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\n##\ \n##\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\n##\ but\ WITHOUT\ ANY\ WARRANTY\;\ without\ even\ the\ implied\ warranty\ of\n##\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\n##\ GNU\ General\ Public\ License\ for\ more\ details.\n##\ \n##\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\n##\ along\ with\ this\ program\;\ if\ not,\ write\ to\ the\n##\ \ \ \ \ Free\ Software\ Foundation,\ Inc.\n##\ \ \ \ \ 51\ Franklin\ Street,\ Fifth\ Floor\n##\ \ \ \ \ Boston,\ MA\ \ 02110-1301,\ USA.\n##\n\nnamespace\ eval\ ::InstallJammer\ \{\}\n\nproc\ lempty\ \{list\}\ \{\n\ \ \ \ if\ \{\[catch\ \{expr\ \[llength\ \$list\]\ ==\ 0\}\ ret\]\}\ \{\ return\ 0\ \}\n\ \ \ \ return\ \$ret\n\}\n\nproc\ lassign\ \{\ list\ args\ \}\ \{\n\ \ \ \ foreach\ elem\ \$list\ varName\ \$args\ \{\n\ \ \ \ \tupvar\ 1\ \$varName\ var\n\tset\ var\ \$elem\n\ \ \ \ \}\n\}\n\nproc\ lremove\ \{\ list\ args\ \}\ \{\n\ \ \ \ foreach\ arg\ \$args\ \{\n\tset\ x\ \[lsearch\ -exact\ \$list\ \$arg\]\n\tset\ list\ \[lreplace\ \$list\ \$x\ \$x\]\n\ \ \ \ \}\n\ \ \ \ return\ \$list\n\}\n\nproc\ lreverse\ \{\ list\ \}\ \{\n\ \ \ \ set\ new\ \[list\]\n\ \ \ \ set\ len\ \[llength\ \$list\]\n\ \ \ \ for\ \{set\ i\ \[expr\ \$len\ -\ 1\]\}\ \{\$i\ >=\ 0\}\ \{incr\ i\ -1\}\ \{\n\tlappend\ new\ \[lindex\ \$list\ \$i\]\n\ \ \ \ \}\n\ \ \ \ return\ \$new\n\}\n\nproc\ lassign_array\ \{list\ arrayName\ args\}\ \{\n\ \ \ \ upvar\ 1\ \$arrayName\ array\n\ \ \ \ foreach\ elem\ \$list\ var\ \$args\ \{\n\tset\ array(\$var)\ \$elem\n\ \ \ \ \}\n\}\n\nproc\ incr0\ \{\ varName\ \{n\ 1\}\ \}\ \{\n\ \ \ \ upvar\ 1\ \$varName\ var\n\ \ \ \ if\ \{!\[info\ exists\ var\]\}\ \{\ set\ var\ 0\ \}\n\ \ \ \ incr\ var\ \$n\n\}\n\nproc\ iincr\ \{\ varName\ \{n\ 1\}\ \}\ \{\n\ \ \ \ upvar\ 1\ \$varName\ var\n\ \ \ \ if\ \{!\[info\ exists\ var\]\}\ \{\ set\ var\ 0\ \}\n\ \ \ \ set\ var\ \[expr\ \{\$var\ +\ \$n\}\]\n\}\n\nproc\ recursive_glob\ \{dir\ pattern\}\ \{\n\ \ \ \ set\ files\ \[glob\ -nocomplain\ -type\ f\ -dir\ \$dir\ \$pattern\]\n\ \ \ \ foreach\ dir\ \[glob\ -nocomplain\ -type\ d\ -dir\ \$dir\ *\]\ \{\n\ \ \ \ \ \ \ \ eval\ lappend\ files\ \[recursive_glob\ \$dir\ \$pattern\]\n\ \ \ \ \}\n\ \ \ \ return\ \$files\n\}\n\nproc\ noop\ \{args\}\ \{\}\n\nproc\ read_file\ \{\ file\ args\ \}\ \{\n\ \ \ \ set\ fp\ \[open\ \$file\]\n\ \ \ \ eval\ \[list\ fconfigure\ \$fp\]\ -encoding\ utf-8\ \$args\n\ \ \ \ set\ x\ \[read\ \$fp\]\n\ \ \ \ close\ \$fp\n\ \ \ \ return\ \$x\n\}\n\nproc\ debug\ \{\ message\ \{id\ \"\"\}\ \}\ \{\n\ \ \ \ set\ time\ \[clock\ format\ \[clock\ seconds\]\ -format\ \"%m/%d/%Y\ %H:%M:%S%p\"\]\n\ \ \ \ set\ string\ \"\$time\ -\ \$message\"\n\n\ \ \ \ if\ \{\[set\ x\ \[::InstallJammer::SubstText\ \$message\]\]\ ne\ \$message\}\ \{\n\ \ \ \ \ \ \ \ append\ string\ \"\\n\$time\ -\ **\ \$x\"\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\$id\ ne\ \"\"\ &&\ \[\$id\ get\ Comment\ comment\]\ &&\ \$comment\ ne\ \"\"\}\ \{\n\ \ \ \ \ \ \ \ append\ string\ \"\\n\$time\ -\ #\ \$comment\"\n\ \ \ \ \ \ \ \ if\ \{\[set\ x\ \[::InstallJammer::SubstText\ \$comment\]\]\ ne\ \$comment\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ append\ string\ \"\\n\$time\ -\ **\ \$x\"\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\[info\ exists\ ::InstallJammer\]\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ ::debug\]\ &&\ \$::debug\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ puts\ \ stderr\ \$string\n\ \ \ \ \ \ \ \ \ \ \ \ flush\ stderr\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{\$::conf(debugging)\}\ \{\n\ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ ::debugfp\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ ::debugfp\ \[open\ \[::InstallJammer::TmpDir\ debug.log\]\ w\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ puts\ \ \$::debugfp\ \$string\n\ \ \ \ \ \ \ \ flush\ \$::debugfp\n\ \ \ \ \}\n\}\n\}\n\nproc\ SafeSet\ \{\ varName\ value\ \}\ \{\n\ \ \ \ upvar\ 1\ \$varName\ var\n\ \ \ \ if\ \{!\[info\ exists\ var\]\}\ \{\ set\ var\ \$value\ \}\n\ \ \ \ return\ \$value\n\}\n\nproc\ SafeArraySet\ \{\ arrayName\ list\ \}\ \{\n\ \ \ \ upvar\ 1\ \$arrayName\ array\n\ \ \ \ foreach\ \{varName\ elem\}\ \$list\ \{\n\tif\ \{!\[info\ exists\ array(\$varName)\]\}\ \{\ set\ array(\$varName)\ \$elem\ \}\n\ \ \ \ \}\n\}\n\n\npackage\ require\ msgcat\n\n##\ We're\ going\ to\ redefine\ some\ of\ Tcl's\ msgcat\ commands\ in\ the\n##\ name\ of\ simplifying\ things.\nproc\ ::msgcat::mc\ \{\ src\ args\ \}\ \{\n\ \ \ \ foreach\ loc\ \[concat\ \[::msgcat::mcpreferences\]\ en\]\ \{\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ ::msgcat::Msgs_\$\{loc\}(\$src)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ dest\ \[set\ ::msgcat::Msgs_\$\{loc\}(\$src)\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[llength\ \$args\]\}\ \{\ return\ \$dest\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[uplevel\ 1\ \[linsert\ \$args\ 0\ ::format\ \$dest\]\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[llength\ \$args\]\}\ \{\n\ \ \ \ \ \ \ \ return\ \[uplevel\ 1\ \[linsert\ \$args\ 0\ ::format\ \$src\]\]\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ return\ \$src\n\ \ \ \ \}\n\}\n\nproc\ ::msgcat::mcexists\ \{\ src\ \{locales\ \{\}\}\ \}\ \{\n\ \ \ \ if\ \{!\[llength\ \$locales\]\}\ \{\n\ \ \ \ \ \ \ \ set\ locales\ \[concat\ \[::msgcat::mcpreferences\]\ en\]\n\ \ \ \ \}\n\ \ \ \ foreach\ locale\ \$locales\ \{\n\ \ \ \ \ \ \ \ if\ \{\$locale\ eq\ \"None\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ upvar\ #0\ ::info\ msgs\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ upvar\ #0\ ::msgcat::Msgs_\$\{locale\}\ msgs\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ msgs(\$src)\]\}\ \{\ return\ 1\ \}\n\ \ \ \ \}\n\ \ \ \ return\ 0\n\}\n\nproc\ ::msgcat::mcset\ \{\ locale\ src\ \{dest\ \"\"\}\ \}\ \{\n\ \ \ \ if\ \{\$locale\ eq\ \"None\"\}\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::info\ msgs\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::msgcat::Msgs_\$\{locale\}\ msgs\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[llength\ \[info\ level\ 0\]\]\ ==\ 3\}\ \{\ set\ dest\ \$src\ \}\n\ \ \ \ set\ msgs(\$src)\ \$dest\n\}\n\nproc\ ::msgcat::mcunset\ \{\ locale\ src\ \}\ \{\n\ \ \ \ if\ \{\$locale\ eq\ \"None\"\}\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::info\ msgs\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::msgcat::Msgs_\$\{locale\}\ msgs\n\ \ \ \ \}\n\n\ \ \ \ unset\ -nocomplain\ msgs(\$src)\n\}\n\nproc\ ::msgcat::mcmset\ \{\ locale\ pairs\ \}\ \{\n\ \ \ \ if\ \{\$locale\ eq\ \"None\"\}\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::info\ msgs\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::msgcat::Msgs_\$\{locale\}\ msgs\n\ \ \ \ \}\n\n\ \ \ \ array\ set\ msgs\ \$pairs\n\}\n\nproc\ ::msgcat::mcgetall\ \{\ locale\ \}\ \{\n\ \ \ \ if\ \{\$locale\ eq\ \"None\"\}\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::info\ msgs\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::msgcat::Msgs_\$\{locale\}\ msgs\n\ \ \ \ \}\n\n\ \ \ \ return\ \[array\ get\ msgs\]\n\}\n\nproc\ ::msgcat::mcget\ \{\ locale\ src\ args\ \}\ \{\n\ \ \ \ if\ \{\$locale\ eq\ \"None\"\}\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::info\ msgs\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ upvar\ #0\ ::msgcat::Msgs_\$\{locale\}\ msgs\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[info\ exists\ msgs(\$src)\]\}\ \{\n\ \ \ \ \ \ \ \ set\ dest\ \$msgs(\$src)\n\ \ \ \ \ \ \ \ if\ \{!\[llength\ \$args\]\}\ \{\ return\ \$dest\ \}\n\ \ \ \ \ \ \ \ return\ \[uplevel\ 1\ \[linsert\ \$args\ 0\ ::format\ \$dest\]\]\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[llength\ \$args\]\}\ \{\n\ \ \ \ \ \ \ \ return\ \[uplevel\ 1\ \[linsert\ \$args\ 0\ ::format\ \$src\]\]\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ return\ \$src\n\ \ \ \ \}\n\}\n\nproc\ ::msgcat::mcclear\ \{\ locale\ \}\ \{\n\ \ \ \ unset\ -nocomplain\ ::msgcat::Msgs_\$\{locale\}\n\}\n\nnamespace\ eval\ ::InstallJammer\ \{\}\nnamespace\ eval\ ::InstallJammer::actions\ \{\}\nnamespace\ eval\ ::InstallJammer::conditions\ \{\}\n\nproc\ ::InstallJammer::CommonInit\ \{\}\ \{\n\ \ \ \ global\ info\n\ \ \ \ global\ conf\n\n\ \ \ \ if\ \{\[info\ exists\ conf(commonInit)\]\}\ \{\ return\ \}\n\n\ \ \ \ set\ conf(windows)\ \[string\ equal\ \$::tcl_platform(platform)\ \"windows\"\]\n\n\ \ \ \ array\ set\ conf\ \{\n\tcommonInit\ \ \ 1\n\ \ \ \ \ \ \ \ debugging\ \ \ \ 0\n\n\ \ \ \ \ \ \ \ ParentWindow\ \"\"\n\n\tSubstDirVars\ \{\n\t\ \ \ \ CommonStartMenu\n\ \ \ \ \ \ \ \ \ \ \ \ Desktop\n\ \ \ \ \ \ \ \ \ \ \ \ FileBeingInstalled\n\t\ \ \ \ GnomeCommonStartMenu\n\t\ \ \ \ GnomeDesktop\n\t\ \ \ \ GnomeStartMenu\n\t\ \ \ \ Home\n\t\ \ \ \ InstallDir\n\t\ \ \ \ Installer\n\t\ \ \ \ InstallLogDirectory\n\t\ \ \ \ InstallSource\n\t\ \ \ \ KDECommonStartMenu\n\t\ \ \ \ KDEDesktop\n\t\ \ \ \ KDEStartMenu\n\ \ \ \ \ \ \ \ \ \ \ \ ProgramReadme\n\ \ \ \ \ \ \ \ \ \ \ \ ProgramLicense\n\t\ \ \ \ ProgramExecutable\n\t\ \ \ \ ProgramFolder\n\t\ \ \ \ Uninstaller\n\t\ \ \ \ UninstallDirectory\n\t\}\n\n\ \ \ \ \ \ \ \ VirtualTextMap\ \ \ \ \ \ \ \ \ \ \ \ \{\}\n\tVirtualTextRecursionLimit\ 10\n\ \ \ \ \}\n\n\ \ \ \ lappend\ conf(VirtualTextMap)\ \"\\\\\"\ \"\\\\\\\\\"\ \"\\\[\"\ \"\\\\\\\[\"\n\ \ \ \ lappend\ conf(VirtualTextMap)\ \"<%\"\ \{\[::InstallJammer::SubstVar\ \[list\ \}\n\ \ \ \ lappend\ conf(VirtualTextMap)\ \"%>\"\ \{\]\]\}\n\n\ \ \ \ if\ \{\[info\ exists\ ::installkit::root\]\}\ \{\n\ \ \ \ \ \ \ \ set\ conf(vfs)\ \$::installkit::root\n\ \ \ \ \}\n\ \ \ \ set\ conf(exe)\ \ \ \ \ \ \[info\ nameofexecutable\]\n\ \ \ \ set\ conf(script)\ \ \ \[info\ script\]\n\ \ \ \ set\ conf(threaded)\ \[info\ exists\ ::tcl_platform(threaded)\]\n\n\ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ set\ info(Ext)\ .exe\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ info(Ext)\ \"\"\n\ \ \ \ \}\n\n\ \ \ \ ::InstallJammer::InitializeMessageCatalogs\n\n\ \ \ \ if\ \{!\[info\ exists\ ::InstallJammer\]\}\ \{\n\ \ \ \ \ \ \ \ ##\ Setup\ common\ variables\ for\ an\ install\ or\ uninstall.\n\ \ \ \ \ \ \ \ array\ set\ info\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ Wizard\ \ \ \ \ \ \ \ \ \ \ .wizard\n\ \ \ \ \ \ \ \ \ \ \ \ WizardFirstStep\ \ 0\n\ \ \ \ \ \ \ \ \ \ \ \ WizardLastStep\ \ \ 0\n\t\ \ \ \ Errors\ \ \ \ \ \ \ \ \ \ \ \"\"\n\n\ \ \ \ \ \ \ \ \ \ \ \ SilentMode\ \ \ \ \ \ \ 0\n\ \ \ \ \ \ \ \ \ \ \ \ DefaultMode\ \ \ \ \ \ 0\n\ \ \ \ \ \ \ \ \ \ \ \ InstallMode\ \ \ \ \ \ \"Standard\"\n\n\ \ \ \ \ \ \ \ \ \ \ \ UserMovedBack\ \ \ \ 0\n\ \ \ \ \ \ \ \ \ \ \ \ UserMovedNext\ \ \ \ 0\n\n\ \ \ \ \ \ \ \ \ \ \ \ RunningInstaller\ \ \ 0\n\ \ \ \ \ \ \ \ \ \ \ \ RunningUninstaller\ 0\n\ \ \ \ \ \ \ \ \}\n\n\tSafeArraySet\ info\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ AllowLanguageSelection\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ IncludeDebugging\ \ \ \ \ \ \ No\n\ \ \ \ \ \ \ \ \ \ \ \ Language\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ en\n\n\ \ \ \ \ \ \ \ \ \ \ \ SpaceRequiredText\ \ \"<%DiskSpace\ <%SpaceRequired%>%>\"\n\ \ \ \ \ \ \ \ \ \ \ \ SpaceAvailableText\ \"<%DiskSpace\ <%SpaceAvailable%>%>\"\n\t\}\n\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ info(DefaultLanguage)\]\ &&\ \$info(RunningInstaller)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(Language)\ \$info(DefaultLanguage)\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ variable\ languages\n\ \ \ \ \ \ \ \ variable\ languagecodes\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ languages(\$info(Language))\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(Language)\ \$languages(\$info(Language))\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ set\ info(Username)\ \$::tcl_platform(user)\n\ \ \ \ \ \ \ \ if\ \{!\[catch\ \{\ exec\ whoami\ \}\ username\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(Username)\ \$username\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ set\ info(UserIsRoot)\ \[string\ equal\ \$info(Username)\ \"root\"\]\n\n\ \ \ \ \ \ \ \ ::InstallJammer::GetInstallInfoDir\n\n\t##\ Setup\ the\ virtual\ registry\ texts\ on\ Windows.\n\ \ \ \ \ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(Desktop)\ <%DESKTOP%>\n\n\ \ \ \ \ \ \ \ \ \ \ \ set\ root\ \"<%PROGRAMS%>\"\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$info(ProgramFolderAllUsers)\}\ \{\ set\ root\ \"<%COMMON_PROGRAMS%>\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(ProgramFolder)\ \"\$root/<%ProgramFolderName%>\"\n\n\ \ \ \ \ \ \ \ \ \ \ \ SetupRegVirtualText\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetWindowsPlatform\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(HasKDEDesktop)\ \ \ \[::InstallJammer::HasKDEDesktop\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(HasGnomeDesktop)\ \[::InstallJammer::HasGnomeDesktop\]\n\n\ \ \ \ \ \ \ \ \ \ \ \ switch\ --\ \[::InstallJammer::GetDesktopEnvironment\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"KDE\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ info(Desktop)\ <%KDEDesktop%>\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"Gnome\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ info(Desktop)\ <%GnomeDesktop%>\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ SafeArraySet\ info\ \{\n\ \ \ \ \ \ \ \ Date\ \ \ \ \ \ \ \ \ \ \ \ \"<%Date\ <%DateFormat%>%>\"\n\ \ \ \ \ \ \ \ DateFormat\ \ \ \ \ \ \"%Y%m%d\"\n\ \ \ \ \}\n\n\ \ \ \ set\ conf(mclocale)\ \[::msgcat::mcpreferences\]\n\n\ \ \ \ if\ \{\[info\ exists\ info(Language)\]\}\ \{\n\ \ \ \ \ \ \ \ ::msgcat::mclocale\ \$info(Language)\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ ::msgcat::mclocale\ en\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::InitializeMessageCatalogs\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ variable\ languages\n\ \ \ \ variable\ languagecodes\n\n\ \ \ \ if\ \{!\[array\ exists\ languagecodes\]\}\ \{\n\ \ \ \ \ \ \ \ array\ set\ languagecodes\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ de\ \ \ \ \ \ German\n\ \ \ \ \ \ \ \ \ \ \ \ en\ \ \ \ \ \ English\n\ \ \ \ \ \ \ \ \ \ \ \ es\ \ \ \ \ \ Spanish\n\ \ \ \ \ \ \ \ \ \ \ \ fr\ \ \ \ \ \ French\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[info\ exists\ info(Languages)\]\}\ \{\n\ \ \ \ \ \ \ \ array\ set\ languagecodes\ \$info(Languages)\n\ \ \ \ \}\n\n\ \ \ \ foreach\ var\ \[array\ names\ languagecodes\]\ \{\n\ \ \ \ \ \ \ \ set\ languages(\$languagecodes(\$var))\ \$var\n\ \ \ \ \}\n\ \ \ \ set\ languages(None)\ None\n\n\ \ \ \ return\ \[lsort\ \[array\ names\ languagecodes\]\]\n\}\n\nproc\ ::InstallJammer::GetLanguageCodes\ \{\}\ \{\n\ \ \ \ variable\ languagecodes\n\ \ \ \ return\ \[lsort\ \[array\ names\ languagecodes\]\]\n\}\n\nproc\ ::InstallJammer::GetLanguages\ \{\ \{includeNone\ 0\}\ \}\ \{\n\ \ \ \ variable\ languages\n\ \ \ \ set\ list\ \[lremove\ \[lsort\ \[array\ names\ languages\]\]\ None\]\n\ \ \ \ if\ \{\$includeNone\}\ \{\ set\ list\ \[linsert\ \$list\ 0\ None\]\ \}\n\ \ \ \ return\ \$list\n\}\n\nproc\ ::InstallJammer::LoadTwapi\ \{\}\ \{\n\ \ \ \ global\ conf\n\n\ \ \ \ ##\ Check\ to\ see\ if\ the\ user\ included\ the\ TWAPI\ extension\n\ \ \ \ ##\ and\ that\ we're\ on\ Windows\ XP\ or\ higher.\ \ If\ so,\ require\n\ \ \ \ ##\ the\ extension\ to\ load\ the\ commands.\n\ \ \ \ if\ \{\$conf(windows)\n\ \ \ \ \ \ \ \ &&\ \$::tcl_platform(osVersion)\ >=\ 5.0\n\ \ \ \ \ \ \ \ &&\ \[info\ exists\ ::installkit::root\]\n\ \ \ \ \ \ \ \ &&\ \[llength\ \[package\ versions\ twapi\]\]\}\ \{\n\ \ \ \ \ \ \ \ ##\ Set\ a\ variable\ to\ trick\ TWAPI.\n\ \ \ \ \ \ \ \ namespace\ eval\ ::starkit\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ variable\ topdir\ \$::installkit::root\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ package\ require\ twapi\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::HideMainWindow\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ ##\ Hide\ the\ .\ window\ so\ no\ one\ will\ ever\ find\ it.\n\ \ \ \ wm\ title\ \ \ \ .\ \"\$info(AppName)\ Setup\"\n\ \ \ \ wm\ geometry\ .\ 0x0+-10000+-10000\n\ \ \ \ if\ \{!\$conf(windows)\ ||\ \$info(SilentMode)\}\ \{\ wm\ overrideredirect\ .\ 1\ \}\n\ \ \ \ if\ \{!\$info(SilentMode)\}\ \{\ wm\ deiconify\ .\ \}\n\}\n\nproc\ ::InstallJammer::NewStyle\ \{\ newStyle\ oldStyle\ args\ \}\ \{\n\ \ \ \ style\ layout\ \$newStyle\ \[style\ layout\ \$oldStyle\]\n\ \ \ \ eval\ \[list\ style\ configure\ \$newStyle\]\ \[style\ configure\ \$oldStyle\]\ \$args\n\ \ \ \ return\ \$newStyle\n\}\n\nproc\ ::InstallJammer::CreateDir\ \{\ dir\ \{log\ 1\}\ \}\ \{\n\ \ \ \ variable\ CreateDir\n\n\ \ \ \ if\ \{!\[info\ exists\ CreateDir(\$dir)\]\}\ \{\n\ \ \ \ \ \ \ \ set\ list\ \[file\ split\ \$dir\]\n\n\ \ \ \ \ \ \ \ for\ \{set\ i\ 0\}\ \{\$i\ <\ \[llength\ \$list\]\}\ \{incr\ i\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ dirlist\ \[lindex\ \$list\ \$i\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ dir\ \[eval\ file\ join\ \$dirlist\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ CreateDir(\$dir)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ CreateDir(\$dir)\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[file\ exists\ \$dir\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file\ mkdir\ \$dir\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$log\}\ \{\ ::InstallJammer::LogDir\ \$dir\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$dir\n\}\n\nproc\ ::InstallJammer::DirIsEmpty\ \{\ dir\ \}\ \{\n\ \ \ \ set\ list1\ \[glob\ -nocomplain\ -directory\ \$dir\ *\]\n\ \ \ \ set\ list2\ \[glob\ -nocomplain\ -directory\ \$dir\ -types\ hidden\ *\]\n\ \ \ \ set\ list\ \ \[lremove\ \[concat\ \$list1\ \$list2\]\ \$dir/.\ \$dir/..\]\n\ \ \ \ return\ \ \ \ \[lempty\ \$list\]\n\}\n\nproc\ ::InstallJammer::PlaceWindow\ \{\ id\ args\ \}\ \{\n\ \ \ \ set\ id\ \[::InstallJammer::ID\ \$id\]\n\ \ \ \ set\ anchor\ center\n\n\ \ \ \ if\ \{\[winfo\ exists\ \$id\]\}\ \{\n\ \ \ \ \ \ \ \ set\ target\ \$id\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ target\ \[\$id\ window\]\n\ \ \ \ \ \ \ \ if\ \{!\[\$id\ get\ Anchor\ anchor\]\}\ \{\ set\ anchor\ center\ \}\n\ \ \ \ \}\n\n\ \ \ \ array\ set\ data\ \"\n\t-anchor\ \$anchor\n\t-width\ \ \[winfo\ reqwidth\ \ \$target\]\n\t-height\ \[winfo\ reqheight\ \$target\]\n\ \ \ \ \"\n\n\ \ \ \ array\ set\ data\ \$args\n\n\ \ \ \ set\ w\ \ \$data(-width)\n\ \ \ \ set\ h\ \ \$data(-height)\n\ \ \ \ set\ sw\ \[winfo\ screenwidth\ \$target\]\n\ \ \ \ set\ sh\ \[winfo\ screenheight\ \$target\]\n\ \ \ \ lassign\ \[wm\ maxsize\ .\]\ maxw\ maxh\n\ \ \ \ set\ anchor\ \$data(-anchor)\n\ \ \ \ switch\ --\ \$anchor\ \{\n\t\"center\"\ \{\n\t\ \ \ \ set\ x0\ \[expr\ (\$sw\ -\ \$w)\ /\ 2\ -\ \[winfo\ vrootx\ \$target\]\]\n\t\ \ \ \ set\ y0\ \[expr\ (\$sh\ -\ \$h)\ /\ 2\ -\ \[winfo\ vrooty\ \$target\]\]\n\t\}\n\n\t\"n\"\ \{\n\t\ \ \ \ set\ x0\ \[expr\ (\$sw\ -\ \$w)\ \ /\ 2\ -\ \[winfo\ vrootx\ \$target\]\]\n\t\ \ \ \ set\ y0\ 20\n\t\}\n\n\t\"ne\"\ \{\n\t\ \ \ \ set\ x0\ \[expr\ \$maxw\ -\ \$w\ -\ 40\]\n\t\ \ \ \ set\ y0\ 20\n\t\}\n\n\t\"e\"\ \{\n\t\ \ \ \ set\ x0\ \[expr\ \$maxw\ -\ \$w\ -\ 40\]\n\t\ \ \ \ set\ y0\ \[expr\ (\$sh\ -\ \$h)\ /\ 2\ -\ \[winfo\ vrooty\ \$target\]\]\n\t\}\n\n\t\"se\"\ \{\n\t\ \ \ \ set\ x0\ \[expr\ \$maxw\ -\ \$w\ -\ 40\]\n\t\ \ \ \ set\ y0\ \[expr\ \$maxh\ -\ \$h\ -\ 80\]\n\t\}\n\n\t\"s\"\ \{\n\t\ \ \ \ set\ x0\ \[expr\ (\$sw\ -\ \$w)\ \ /\ 2\ -\ \[winfo\ vrootx\ \$target\]\]\n\t\ \ \ \ set\ y0\ \[expr\ \$maxh\ -\ \$h\ -\ 80\]\n\t\}\n\n\t\"sw\"\ \{\n\t\ \ \ \ set\ x0\ 20\n\t\ \ \ \ set\ y0\ \[expr\ \$maxh\ -\ \$h\ -\ 80\]\n\t\}\n\n\t\"w\"\ \{\n\t\ \ \ \ set\ x0\ 20\n\t\ \ \ \ set\ y0\ \[expr\ (\$sh\ -\ \$h)\ /\ 2\ -\ \[winfo\ vrooty\ \$target\]\]\n\t\}\n\n\t\"nw\"\ \{\n\t\ \ \ \ set\ x0\ 20\n\t\ \ \ \ set\ y0\ 20\n\t\}\n\n\tdefault\ \{\n\t\ \ \ \ append\ msg\ \"bad\ anchor\ \\\"\$anchor\\\":\ must\ be\"\n\t\ \ \ \ append\ msg\ \"n,\ ne,\ e,\ se,\ s,\ sw,\ w,\ nw\ or\ center\"\n\t\ \ \ \ return\ -code\ error\ \$msg\n\t\}\n\ \ \ \ \}\n\n\ \ \ \ set\ x\ \"+\$x0\"\n\ \ \ \ set\ y\ \"+\$y0\"\n\ \ \ \ if\ \{\ \$x0+\$w\ >\ \$sw\ \}\ \{set\ x\ \"-0\"\;\ set\ x0\ \[expr\ \{\$sw-\$w\}\]\}\n\ \ \ \ if\ \{\ \$x0\ <\ 0\ \}\ \ \ \ \ \ \{set\ x\ \"+0\"\}\n\ \ \ \ if\ \{\ \$y0+\$h\ >\ \$sh\ \}\ \{set\ y\ \"-0\"\;\ set\ y0\ \[expr\ \{\$sh-\$h\}\]\}\n\ \ \ \ if\ \{\ \$y0\ <\ 0\ \}\ \ \ \ \ \ \{set\ y\ \"+0\"\}\n\n\ \ \ \ wm\ geometry\ \$target\ \$x\$y\n\ \ \ \ update\n\}\n\nproc\ ::InstallJammer::CenterWindow\ \{\ target\ \{w\ 473\}\ \{h\ 335\}\ \{lower\ 0\}\ \}\ \{\n\ \ \ \ set\ args\ \[list\ -width\ \$w\ -height\ \$h\]\n\ \ \ \ if\ \{\$lower\}\ \{\ lappend\ args\ -anchor\ s\ \}\n\ \ \ \ eval\ \[list\ PlaceWindow\ \$target\]\ \$args\n\}\n\nproc\ ::InstallJammer::ID\ \{\ alias\ \}\ \{\n\ \ \ \ variable\ ::InstallJammer::aliases\n\ \ \ \ if\ \{\[info\ exists\ aliases(\$alias)\]\}\ \{\ return\ \$aliases(\$alias)\ \}\n\ \ \ \ return\ \$alias\n\}\n\nproc\ ::InstallJammer::FindCommonPane\ \{\ pane\ \}\ \{\n\ \ \ \ foreach\ id\ \[Common\ children\]\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ equal\ \[\$id\ component\]\ \$pane\]\}\ \{\ return\ \$id\ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::FindObjByName\ \{\ name\ objects\ \}\ \{\n\ \ \ \ foreach\ object\ \$objects\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ equal\ \[\$object\ name\]\ \$name\]\}\ \{\ return\ \$object\ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::GetPaneProc\ \{\ id\ prefix\ \}\ \{\n\ \ \ \ set\ proc\ \$prefix.\$id\n\ \ \ \ if\ \{!\[::InstallJammer::CommandExists\ \$proc\]\}\ \{\n\ \ \ \ \tset\ proc\ \$prefix.\[\$id\ component\]\n\ \ \ \ \}\n\ \ \ \ if\ \{\[::InstallJammer::CommandExists\ \$proc\]\}\ \ \{\ return\ \$proc\ \}\n\}\n\nproc\ ::InstallJammer::ExecuteActions\ \{\ id\ args\ \}\ \{\n\ \ \ \ array\ set\ _args\ \{\n\ \ \ \ \ \ \ \ -when\ \ \ \ \ \ \ \"\"\n\ \ \ \ \ \ \ \ -type\ \ \ \ \ \ \ \"\"\n\ \ \ \ \ \ \ \ -parent\ \ \ \ \ \"\"\n\ \ \ \ \ \ \ \ -conditions\ 1\n\ \ \ \ \}\n\ \ \ \ array\ set\ _args\ \$args\n\n\ \ \ \ set\ id\ \[::InstallJammer::ID\ \$id\]\n\n\ \ \ \ if\ \{!\[::InstallJammer::ObjExists\ \$id\]\}\ \{\ return\ \}\n\n\ \ \ \ if\ \{\[catch\ \{\ \$id\ title\ \}\ title\]\}\ \{\ set\ title\ \$id\ \}\n\n\ \ \ \ if\ \{\[\$id\ is\ action\]\}\ \{\n\ \ \ \ \ \ \ \ set\ idlist\ \[list\ \$id\]\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ idlist\ \[\$id\ children\]\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\[llength\ \$idlist\]\}\ \{\ return\ \}\n\n\ \ \ \ set\ msg\ \"Executing\ actions\ \$id\ -\ \$title\"\n\ \ \ \ if\ \{\$_args(-when)\ ne\ \"\"\}\ \{\ append\ msg\ \"\ -\ \$_args(-when)\"\ \}\n\ \ \ \ debug\ \$msg\n\n\ \ \ \ set\ res\ \ 1\n\ \ \ \ set\ tempObjects\ \[list\]\n\ \ \ \ foreach\ childid\ \$idlist\ \{\n\ \ \ \ \ \ \ \ set\ err\ \ 0\n\ \ \ \ \ \ \ \ set\ res\ \ 1\n\ \ \ \ \ \ \ \ set\ obj\ \ \$childid\n\ \ \ \ \ \ \ \ set\ type\ \[\$obj\ component\]\n\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$_args(-type)\]\ &&\ \$type\ ne\ \$_args(-type)\}\ \{continue\}\n\n\ \ \ \ \ \ \ \ ##\ If\ we\ have\ a\ parent,\ it\ means\ that\ we're\ an\ ExecuteAction\n\ \ \ \ \ \ \ \ ##\ action\ that\ is\ calling\ another\ action,\ which\ can\ also\ be\n\ \ \ \ \ \ \ \ ##\ an\ action\ group.\ \ We\ want\ the\ action\ we're\ executing\n\ \ \ \ \ \ \ \ ##\ to\ have\ the\ attributes\ of\ the\ parent\ action,\ so\ we\ create\n\ \ \ \ \ \ \ \ ##\ a\ temporary\ object\ that\ inherits\ the\ attributes\ of\ the\n\ \ \ \ \ \ \ \ ##\ parent\ and\ execute\ that\ in\ place\ of\ the\ original\ object.\n\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$_args(-parent)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ obj\ \[::InstallJammer::CreateTempAction\ \$_args(-parent)\ \$childid\]\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ tempObjects\ \$obj\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \$obj\ get\ IgnoreErrors\ \ ignoreErrors\n\ \ \ \ \ \ \ \ \$obj\ get\ ExecuteAction\ when\n\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$_args(-when)\]\n\ \ \ \ \ \ \ \ \ \ \ \ &&\ !\[string\ equal\ -nocase\ \$_args(-when)\ \$when\]\}\ \{\ continue\ \}\n\n\ \ \ \ \ \ \ \ if\ \{\$_args(-conditions)\ &&\ !\[\$obj\ checkConditions\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ debug\ \"Skipping\ action\ \$childid\ -\ \[\$childid\ title\]\\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -\ conditions\ failed\"\n\ \ \ \ \ \ \ \ \ \ \ \ continue\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ debug\ \"Executing\ action\ \$childid\ -\ \[\$childid\ title\]\"\ \$childid\n\n\ \ \ \ \ \ \ \ set\ err\ \[catch\ \{::InstallJammer::actions::\$type\ \$obj\}\ res\]\n\ \ \ \ \ \ \ \ set\ errorInfo\ \$::errorInfo\n\n\ \ \ \ \ \ \ \ if\ \{\$err\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ##\ An\ error\ occurred\ processing\ the\ action.\ \ If\ the\ user\n\ \ \ \ \ \ \ \ \ \ \ \ ##\ has\ opted\ to\ ignore\ errors,\ we\ just\ continue\ on.\n\ \ \ \ \ \ \ \ \ \ \ \ ##\ Otherwise,\ we\ return\ the\ error\ which\ will\ fail\ the\ install.\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$ignoreErrors\}\ \{\ continue\ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ set\ msg\ \"An\ error\ has\ occurred\ during\ installation\\n\\t\$errorInfo\"\n\ \ \ \ \ \ \ \ \ \ \ \ return\ -code\ error\ \$msg\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[llength\ \$tempObjects\]\}\ \{\n\ \ \ \ eval\ itcl::delete\ object\ \$tempObjects\n\}\n\}\n\nproc\ ::InstallJammer::CreateTempAction\ \{\ id\ child\ \}\ \{\n\ \ \ \ set\ obj\ \[InstallComponent\ ::#auto\ -temp\ 1\ -parent\ \[\$id\ parent\]\ \\\n\ \ \ \ \ \ \ \ -setup\ \[\$id\ setup\]\ -type\ action\ -id\ \$child\ -name\ \[\$child\ name\]\ \\\n\ \ \ \ \ \ \ \ -component\ \[\$child\ component\]\ -conditions\ \[\$child\ conditions\]\]\n\n\ \ \ \ return\ \$obj\n\}\n\n##\ Uses\ the\ wizard's\ -backcommand\ option.\nproc\ ::InstallJammer::BackCommand\ \{\ wizard\ id\ \}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ set\ when\ \"Before\ Previous\ Pane\ is\ Displayed\"\n\n\ \ \ \ if\ \{!\[\$id\ checkConditions\ \$when\]\}\ \{\ return\ 0\ \}\n\n\ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\n\ \ \ \ set\ info(UserMovedBack)\ 1\n\ \ \ \ set\ info(UserMovedNext)\ 0\n\n\ \ \ \ return\ 1\n\}\n\n##\ This\ command\ is\ executed\ when\ the\ user\ hits\ next\ but\ before\n##\ the\ next\ pane\ is\ displayed.\n##\ Uses\ the\ wizard's\ -nextcommand\ option.\nproc\ ::InstallJammer::NextCommand\ \{\ wizard\ id\ \}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ set\ when\ \"Before\ Next\ Pane\ is\ Displayed\"\n\n\ \ \ \ if\ \{!\[\$id\ checkConditions\ \$when\]\}\ \{\ return\ 0\ \}\n\n\ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\n\ \ \ \ set\ info(UserMovedBack)\ 0\n\ \ \ \ set\ info(UserMovedNext)\ 1\n\n\ \ \ \ return\ 1\n\}\n\n##\ This\ command\ is\ executed\ before\ the\ installer\ is\ cancelled.\n##\ Uses\ the\ wizard's\ -cancelcommand\ option.\nproc\ ::InstallJammer::CancelCommand\ \{\ wizard\ id\ \}\ \{\n\ \ \ \ set\ when\ \"Before\ Pane\ is\ Cancelled\"\n\n\ \ \ \ if\ \{!\[\$id\ checkConditions\ \$when\]\}\ \{\ return\ 0\ \}\n\n\ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\n\ \ \ \ return\ 1\n\}\n\n##\ Uses\ the\ wizard's\ <<WizardCancel>>\ event.\nproc\ ::InstallJammer::CancelEventHandler\ \{\ wizard\ \}\ \{\n\ \ \ \ #set\ id\ \[\$wizard\ raise\]\n\n\ \ \ \ #set\ when\ \"After\ Pane\ is\ Cancelled\"\n\ \ \ \ #::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\n\ \ \ \ ::InstallJammer::exit\ 1\n\}\n\n##\ This\ command\ is\ executed\ before\ the\ installer\ is\ finished.\n##\ Uses\ the\ wizard's\ -finishcommand\ option.\nproc\ ::InstallJammer::FinishCommand\ \{\ wizard\ id\ \}\ \{\n\ \ \ \ set\ when\ \"Before\ Pane\ is\ Finished\"\n\n\ \ \ \ if\ \{!\[\$id\ checkConditions\ \$when\]\}\ \{\ return\ 0\ \}\n\n\ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\n\ \ \ \ return\ 1\n\}\n\n##\ Uses\ the\ wizard's\ <<WizardFinish>>\ event.\nproc\ ::InstallJammer::FinishEventHandler\ \{\ wizard\ \}\ \{\n\ \ \ \ set\ id\ \[\$wizard\ raise\]\n\n\ \ \ \ set\ when\ \"After\ Pane\ is\ Finished\"\n\ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\n\ \ \ \ ::InstallJammer::exit\n\}\n\n##\ This\ command\ is\ executed\ before\ the\ next\ pane\ is\ displayed\ but\n##\ after\ the\ wizard\ has\ moved\ forward.\n##\ Uses\ the\ wizard's\ -raisecommand\ option.\nproc\ ::InstallJammer::RaiseCommand\ \{\ wizard\ id\ \}\ \{\n\ \ \ \ set\ when\ \"Before\ Pane\ is\ Displayed\"\n\ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\}\n\n##\ Uses\ the\ wizard's\ <<WizardStep>>\ event.\nproc\ ::InstallJammer::RaiseEventHandler\ \{\ wizard\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ set\ id\ \[\$wizard\ raise\]\n\n\ \ \ \ set\ info(CurrentPane)\ \$id\n\n\ \ \ \ if\ \{!\[\$id\ active\]\ ||\ !\[\$id\ checkConditions\ \"Before\ Pane\ is\ Displayed\"\]\}\ \{\n\ \ \ \ \ \ \ \ ##\ This\ pane\ is\ inactive\ or\ doesn't\ meet\ its\ conditions.\n\ \ \ \ \ \ \ \ ##\ Remove\ it\ from\ the\ order\ of\ the\ wizard\ and\ continue\ on\n\ \ \ \ \ \ \ \ ##\ to\ the\ next\ pane.\n\n\ \ \ \ \ \ \ \ if\ \{!\[\$id\ active\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ debug\ \"Skipping\ pane\ \$id\ -\ \[\$id\ title\]\ -\ pane\ is\ inactive\"\ \$id\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ debug\ \"Skipping\ pane\ \$id\ -\ \[\$id\ title\]\ -\ conditions\ failed\"\ \$id\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \$wizard\ order\ \[lrange\ \[\$wizard\ order\]\ 0\ end-1\]\n\ \ \ \ \ \ \ \ ::InstallJammer::Wizard\ next\ 1\ 0\n\ \ \ \ \ \ \ \ return\n\ \ \ \ \}\n\n\ \ \ \ debug\ \"Displaying\ pane\ \$id\ -\ \[\$id\ title\]\"\ \$id\n\n\ \ \ \ ##\ If\ the\ last\ step\ we\ displayed\ was\ a\ window\ and\ not\ part\n\ \ \ \ ##\ of\ the\ wizard,\ we\ need\ to\ withdraw\ the\ window\ as\ we\ move\ on.\n\ \ \ \ if\ \{\[info\ exists\ conf(LastStepId)\]\ &&\ \[\$conf(LastStepId)\ is\ window\]\}\ \{\n\ \ \ \ \ \ \ \ set\ window\ \[\$conf(LastStepId)\ window\]\n\ \ \ \ \ \ \ \ ::InstallJammer::TransientParent\ \$window\ 1\n\ \ \ \ \ \ \ \ wm\ withdraw\ \$window\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ ::InstallJammer::TransientParent\ \$wizard\ 1\n\ \ \ \ \}\n\n\ \ \ \ ##\ If\ this\ component\ is\ a\ window,\ we\ need\ to\ withdraw\ the\n\ \ \ \ ##\ wizard\ and\ display\ it.\n\ \ \ \ if\ \{\[\$id\ is\ window\]\}\ \{\n\ \ \ \ \ \ \ \ set\ base\ \[\$id\ window\]\n\ \ \ \ \ \ \ \ ::InstallJammer::TransientParent\ \$base\n\n\ \ \ \ \ \ \ \ wm\ withdraw\ \$wizard\ \n\n\ \ \ \ \ \ \ \ ::InstallJammer::UpdateWidgets\ -buttons\ 0\n\n\ \ \ \ \ \ \ \ if\ \{!\[\$id\ get\ Modal\ \ modal\]\}\ \ \{\ set\ modal\ \ 0\ \}\n\ \ \ \ \ \ \ \ if\ \{!\[\$id\ get\ Dialog\ dialog\]\}\ \{\ set\ dialog\ 0\ \}\n\n\ \ \ \ \ \ \ \ if\ \{\[winfo\ exists\ \$base\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ wm\ deiconify\ \$base\n\ \ \ \ \ \ \ \ \ \ \ \ raise\ \$base\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$modal\}\ \{\ ::InstallJammer::Grab\ set\ \$base\ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ update\n\n\ \ \ \ \ \ \ \ set\ when\ \"After\ Pane\ is\ Displayed\"\n\ \ \ \ \ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\n\ \ \ \ \ \ \ \ if\ \{\[winfo\ exists\ \$base\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$dialog\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[\$id\ get\ DialogVairiable\ varName\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ tkwait\ variable\ \$varName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ tkwait\ window\ \$base\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$modal\}\ \{\ ::InstallJammer::Grab\ release\ \$base\ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ ::InstallJammer::TransientParent\ \$wizard\n\ \ \ \ \ \ \ \ ::InstallJammer::UpdateWidgets\ -wizard\ \$wizard\ -step\ \$id\n\n\ \ \ \ \ \ \ \ \$wizard\ show\n\ \ \ \ \ \ \ \ update\n\n\ \ \ \ \ \ \ \ set\ when\ \"After\ Pane\ is\ Displayed\"\n\ \ \ \ \ \ \ \ ::InstallJammer::ExecuteActions\ \$id\ -when\ \$when\n\ \ \ \ \}\n\n\ \ \ \ set\ info(WizardFirstStep)\ 0\n\ \ \ \ set\ info(WizardLastStep)\ \ 0\n\n\ \ \ \ set\ conf(LastStepId)\ \$id\n\}\n\nproc\ ::InstallJammer::UpdateWizardButtons\ \{\ args\ \}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ if\ \{\[llength\ \$args\]\}\ \{\n\ \ \ \ \ \ \ \ lassign\ \$args\ wizard\ id\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ wizard\ \$info(Wizard)\n\ \ \ \ \ \ \ \ set\ id\ \[\$wizard\ raise\]\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\[\$id\ get\ Buttons\ buttons\]\}\ \{\ return\ \}\n\n\ \ \ \ foreach\ button\ \[list\ back\ next\ cancel\ finish\ help\]\ \{\n\ \ \ \ \ \ \ \ if\ \{!\[\$wizard\ exists\ \$button\]\}\ \{\ continue\ \}\n\n\ \ \ \ \ \ \ \ set\ text\ \[string\ totitle\ \$button\]\n\ \ \ \ \ \ \ \ if\ \{\[string\ match\ \"*\$text*\"\ \$buttons\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$wizard\ itemconfigure\ \$button\ -hide\ 0\n\n\ \ \ \ \ \ \ \ \ \ \ \ set\ w\ \[\$wizard\ widget\ get\ \$button\ -step\ \$id\]\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetText\ \$w\ \$id\ \[string\ toupper\ \$button\ 0\]Button\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$wizard\ itemconfigure\ \$button\ -hide\ 1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::Wizard\ \{\ args\ \}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ set\ wizard\ \$info(Wizard)\n\n\ \ \ \ if\ \{!\[llength\ \$args\]\}\ \{\ return\ \$wizard\ \}\n\n\ \ \ \ set\ command\ \[lindex\ \$args\ 0\]\n\ \ \ \ set\ args\ \ \ \ \[lrange\ \$args\ 1\ end\]\n\n\ \ \ \ set\ id\ \[::InstallJammer::ID\ \[lindex\ \$args\ 0\]\]\n\n\ \ \ \ switch\ --\ \$command\ \{\n\ \ \ \ \ \ \ \ \"back\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[llength\ \$args\]\}\ \{\ set\ args\ 1\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ eval\ \[list\ \$info(Wizard)\ back\]\ \$args\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"next\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[llength\ \$args\]\}\ \{\ set\ args\ 1\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ eval\ \[list\ \$info(Wizard)\ next\]\ \$args\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"create\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::CreateWindow\ \$wizard\ \$id\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"raise\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ args\ \[lreplace\ \$args\ 0\ 0\ \$id\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[llength\ \$args\]\ ==\ 1\}\ \{\ lappend\ args\ 1\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ eval\ \[list\ \$info(Wizard)\ raise\]\ \$args\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"show\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$wizard\ show\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"hide\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$id\ eq\ \"\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$wizard\ hide\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ wm\ withdraw\ \[\$id\ window\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::CreateWindow\ \{\ wizard\ id\ \{preview\ 0\}\ \}\ \{\n\ \ \ \ set\ id\ \ \ \ \[::InstallJammer::ID\ \$id\]\n\ \ \ \ set\ pane\ \ \[\$id\ component\]\n\ \ \ \ set\ istop\ \[\$id\ is\ window\]\n\n\ \ \ \ set\ base\ \ .\[\$id\ name\]\n\n\ \ \ \ if\ \{\$istop\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[winfo\ exists\ \$base\]\}\ \{\ return\ \$base\ \}\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ if\ \{\[\$wizard\ exists\ \$id\]\ &&\ (\$preview\ ||\ \[\$id\ created\])\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[\$wizard\ widget\ get\ \$id\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ set\ parent\ \[\$id\ parent\]\n\n\ \ \ \ if\ \{\$preview\ &&\ !\[\$wizard\ exists\ \$id\]\}\ \{\n\ \ \ \ \ \ \ \ set\ parent\ root\n\ \ \ \ \ \ \ \ \$id\ get\ WizardOptions\ opts\n\ \ \ \ \ \ \ \ eval\ \[list\ \$wizard\ insert\ step\ end\ \$parent\ \$id\]\ \$opts\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\$preview\ &&\ \[\$wizard\ exists\ \$id\]\}\ \{\n\ \ \ \ \ \ \ \ \$wizard\ itemconfigure\ \$id\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -backcommand\ \ \ \[list\ ::InstallJammer::BackCommand\ \ \$wizard\ \$id\]\ \ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -nextcommand\ \ \ \[list\ ::InstallJammer::NextCommand\ \ \$wizard\ \$id\]\ \ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -raisecommand\ \ \[list\ ::InstallJammer::RaiseCommand\ \$wizard\ \$id\]\ \ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -cancelcommand\ \[list\ ::InstallJammer::CancelCommand\ \$wizard\ \$id\]\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ -finishcommand\ \[list\ ::InstallJammer::FinishCommand\ \$wizard\ \$id\]\n\n\ \ \ \ \ \ \ \ bind\ \$wizard\ <<WizardStep>>\ \ \ \"::InstallJammer::RaiseEventHandler\ \ %W\"\n\ \ \ \ \ \ \ \ bind\ \$wizard\ <<WizardCancel>>\ \"::InstallJammer::CancelEventHandler\ %W\"\n\ \ \ \ \ \ \ \ bind\ \$wizard\ <<WizardFinish>>\ \"::InstallJammer::FinishEventHandler\ %W\"\n\n\ \ \ \ \ \ \ \ bind\ \$wizard\ <<WizardLastStep>>\ \ \"set\ ::info(WizardLastStep)\ \ 1\"\n\ \ \ \ \ \ \ \ bind\ \$wizard\ <<WizardFirstStep>>\ \"set\ ::info(WizardFirstStep)\ 1\"\n\n\ \ \ \ \ \ \ \ \$id\ created\ 1\n\ \ \ \ \}\n\n\ \ \ \ set\ proc\ \[GetPaneProc\ \$id\ CreateWindow\]\n\n\ \ \ \ if\ \{\[string\ length\ \$proc\]\}\ \{\n\ \ \ \ \ \ \ \ if\ \{!\$istop\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$wizard\ createstep\ \$id\n\n\ \ \ \ \ \ \ \ \ \ \ \ \$proc\ \$wizard\ \$id\n\ \ \ \ \ \ \ \ \ \ \ \ set\ base\ \[\$wizard\ widget\ get\ \$id\]\n\ \ \ \ \ \ \ \ \ \ \ \ \$id\ window\ \$base\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$id\ window\ \$base\n\ \ \ \ \ \ \ \ \ \ \ \ \$proc\ \$wizard\ \$id\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$base\n\}\n\nproc\ ::InstallJammer::TransientParent\ \{\ \{parent\ \"\"\}\ \{remove\ 0\}\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\$remove\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ conf(ParentWindow)\ \[lremove\ \$conf(ParentWindow)\ \$parent\]\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ conf(ParentWindow)\ \$parent\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ if\ \{\[info\ exists\ conf(ParentWindow)\]\}\ \{\n\ \ \ \ \ \ \ \ return\ \[lindex\ \$conf(ParentWindow)\ end\]\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::SetObjectProperties\ \{\ id\ args\ \}\ \{\n\ \ \ \ variable\ ::InstallJammer::Properties\n\n\ \ \ \ array\ set\ data\ \{\n\ \ \ \ \ \ \ \ -safe\ \ \ \ \ \ \ 0\n\ \ \ \ \ \ \ \ -nocomplain\ 0\n\ \ \ \ \}\n\n\ \ \ \ set\ idx\ 0\n\ \ \ \ foreach\ arg\ \$args\ \{\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ data(\$arg)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ data(\$arg)\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ idx\n\ \ \ \ \ \ \ \ \}\ elseif\ \{\$arg\ eq\ \"--\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ incr\ indx\n\ \ \ \ \ \ \ \ \ \ \ \ break\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ break\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\ \ \ \ set\ args\ \[lrange\ \$args\ \$idx\ end\]\n\n\ \ \ \ if\ \{\[llength\ \$args\]\ ==\ 1\}\ \{\n\ \ \ \ \ \ \ \ set\ property\ \[lindex\ \$args\ 0\]\n\ \ \ \ \ \ \ \ if\ \{\$data(-nocomplain)\n\ \ \ \ \ \ \ \ \ \ \ \ &&\ !\[info\ exists\ Properties(\$id,\$property)\]\}\ \{\ return\ \}\n\ \ \ \ \ \ \ \ return\ \$Properties(\$id,\$property)\n\ \ \ \ \}\n\n\ \ \ \ foreach\ \[list\ property\ value\]\ \$args\ \{\n\ \ \ \ \ \ \ \ if\ \{!\$data(-safe)\ ||\ !\[info\ exists\ Properties(\$id,\$property)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$property\ eq\ \"Alias\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ variable\ ::InstallJammer::aliases\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ variable\ ::InstallJammer::aliasmap\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[info\ exists\ aliasmap(\$id)\]\}\ \{\ \$id\ CleanupAlias\ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$value\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ aliases(\$value)\ \$id\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ aliasmap(\$id)\ \$value\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$property\ eq\ \"Active\"\}\ \{\ \$id\ active\ \$value\ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ set\ Properties(\$id,\$property)\ \$value\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$Properties(\$id,\$property)\n\}\n\nproc\ ::InstallJammer::GetObjectProperty\ \{\ id\ property\ \{varName\ \"\"\}\ \}\ \{\n\ \ \ \ variable\ ::InstallJammer::Properties\n\n\ \ \ \ if\ \{\[string\ length\ \$varName\]\}\ \{\n\ \ \ \ \ \ \ \ upvar\ 1\ \$varName\ var\n\ \ \ \ \ \ \ \ set\ var\ \"\"\n\ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ Properties(\$id,\$property)\]\}\ \{\ return\ 0\ \}\n\ \ \ \ \ \ \ \ set\ var\ \$Properties(\$id,\$property)\n\ \ \ \ \ \ \ \ return\ 1\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[info\ exists\ Properties(\$id,\$property)\]\}\ \{\n\ \ \ \ \ \ \ \ return\ \$Properties(\$id,\$property)\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::ObjectProperties\ \{\ id\ arrayName\ args\ \}\ \{\n\ \ \ \ upvar\ 1\ \$arrayName\ array\n\ \ \ \ variable\ ::InstallJammer::Properties\n\n\ \ \ \ set\ subst\ \[list\]\n\ \ \ \ if\ \{\[set\ x\ \[lsearch\ -exact\ \$args\ \"-subst\"\]\]\ >\ -1\}\ \{\n\ \ \ \ \ \ \ \ set\ subst\ \[lindex\ \$args\ \[expr\ \{\$x\ +\ 1\}\]\]\n\ \ \ \ \ \ \ \ set\ args\ \ \[lreplace\ \$args\ \$x\ \[incr\ x\]\]\n\ \ \ \ \}\n\n\ \ \ \ set\ slen\ \[llength\ \$subst\]\n\n\ \ \ \ if\ \{!\[llength\ \$args\]\}\ \{\n\ \ \ \ \ \ \ \ foreach\ varName\ \[array\ names\ Properties\ \$id,*\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ var\ \[string\ map\ \[list\ \$id,\ \"\"\]\ \$varName\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ val\ \$Properties(\$varName)\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$slen\ &&\ (\$subst\ eq\ \"1\"\ ||\ \[lsearch\ -exact\ \$subst\ \$var\]\ >\ -1)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ val\ \[::InstallJammer::SubstText\ \$val\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ set\ array(\$var)\ \$val\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ foreach\ var\ \$args\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ Properties(\$id,\$var)\]\}\ \{\ continue\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ set\ val\ \$Properties(\$id,\$var)\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$slen\ &&\ (\$subst\ eq\ \"1\"\ ||\ \[lsearch\ -exact\ \$subst\ \$var\]\ >\ -1)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ val\ \[::InstallJammer::SubstText\ \$val\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ set\ array(\$var)\ \$val\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::SetTitle\ \{\ w\ id\ \}\ \{\n\ \ \ \ set\ id\ \[::InstallJammer::ID\ \$id\]\n\ \ \ \ set\ title\ \[::InstallJammer::GetText\ \$id\ Title\]\n\ \ \ \ wm\ title\ \$w\ \$title\n\}\n\nproc\ ::InstallJammer::SetVirtualText\ \{\ languages\ window\ args\ \}\ \{\n\ \ \ \ if\ \{\[llength\ \$args\]\ ==\ 1\}\ \{\ set\ args\ \[lindex\ \$args\ 0\]\ \}\n\n\ \ \ \ if\ \{\$languages\ eq\ \"all\"\}\ \{\ set\ languages\ \[GetLanguageCodes\]\ \}\n\n\ \ \ \ foreach\ lang\ \$languages\ \{\n\ \ \ \ \ \ \ \ if\ \{\$lang\ eq\ \"None\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ global\ info\n\ \ \ \ \ \ \ \ \ \ \ \ foreach\ \{name\ value\}\ \$args\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ info(\$name)\ \$value\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ debug\ \"Virtual\ Text\ \$name\ is\ now\ set\ to\ \$value\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ foreach\ \{name\ value\}\ \$args\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::msgcat::mcset\ \$lang\ \$window,\$name\ \$value\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::GetText\ \{\ id\ field\ args\ \}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ array\ set\ _args\ \{\n\ \ \ \ \ \ \ \ -subst\ \ \ \ \ \ 1\n\ \ \ \ \ \ \ \ -language\ \ \ \"\"\n\ \ \ \ \ \ \ \ -forcesubst\ 0\n\ \ \ \ \}\n\ \ \ \ array\ set\ _args\ \$args\n\n\ \ \ \ set\ id\ \ \ \[::InstallJammer::ID\ \$id\]\n\ \ \ \ set\ item\ \[\$id\ component\]\n\n\ \ \ \ if\ \{\[string\ length\ \$_args(-language)\]\}\ \{\n\ \ \ \ \ \ \ \ set\ found\ 0\n\ \ \ \ \ \ \ \ foreach\ lang\ \[concat\ \$_args(-language)\ en\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ text\ \[::msgcat::mcget\ \$lang\ \$id,\$field\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$text\ eq\ \"\$id,\$field\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ text\ \[::msgcat::mcget\ \$lang\ \$item,\$field\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$text\ ne\ \"\$item,\$field\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ found\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ break\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{!\$found\}\ \{\ return\ \}\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ text\ \[::msgcat::mc\ \$id,\$field\]\n\ \ \ \ \ \ \ \ if\ \{\$text\ eq\ \"\$id,\$field\"\}\ \{\ set\ text\ \[::msgcat::mc\ \$item,\$field\]\ \}\n\ \ \ \ \ \ \ \ if\ \{\$text\ eq\ \"\$item,\$field\"\}\ \{\ return\ \}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\$_args(-forcesubst)\n\ \ \ \ \ \ \ \ ||\ (\$_args(-subst)\ &&\ \[\$id\ get\ \$field,subst\ subst\]\ &&\ \$subst)\}\ \{\n\ \ \ \ \ \ \ \ set\ text\ \[::InstallJammer::SubstText\ \$text\]\n\ \ \ \ \}\n\n\ \ \ \ return\ \$text\n\}\n\nproc\ ::InstallJammer::SetText\ \{\ args\ \}\ \{\n\ \ \ \ if\ \{\[llength\ \$args\]\ ==\ 3\}\ \{\n\ \ \ \ \ \ \ \ lassign\ \$args\ w\ id\ field\n\ \ \ \ \ \ \ \ set\ id\ \ \ \[::InstallJammer::ID\ \$id\]\n\ \ \ \ \ \ \ \ set\ text\ \[::InstallJammer::GetText\ \$id\ \$field\]\n\ \ \ \ \}\ elseif\ \{\[llength\ \$args\]\ ==\ 2\}\ \{\n\ \ \ \ \ \ \ \ lassign\ \$args\ w\ text\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\[winfo\ exists\ \$w\]\}\ \{\ return\ \}\n\n\ \ \ \ set\ class\ \[winfo\ class\ \$w\]\n\n\ \ \ \ if\ \{\$class\ eq\ \"Text\"\}\ \{\n\t\$w\ configure\ -state\ normal\n\t\$w\ delete\ 0.0\ end\n\t\$w\ insert\ end\ \$text\n\t\$w\ configure\ -state\ disabled\n\ \ \ \ \}\ elseif\ \{\$class\ eq\ \"Label\"\ &&\ \[string\ length\ \[\$w\ cget\ -textvariable\]\]\}\ \{\n\ \ \ \ \ \ \ \ set\ \[\$w\ cget\ -textvariable\]\ \$text\n\ \ \ \ \}\ else\ \{\n\t\$w\ configure\ -text\ \$text\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::Image\ \{\ id\ image\ \}\ \{\n\ \ \ \ global\ images\n\n\ \ \ \ set\ id\ \ \ \ \[::InstallJammer::ID\ \$id\]\n\ \ \ \ set\ image\ \$id,\$image\n\n\ \ \ \ if\ \{!\[ImageExists\ \$image\]\}\ \{\ set\ image\ \[\$id\ component\],\$image\ \}\n\ \ \ \ if\ \{\[ImageExists\ \$image\]\}\ \{\ return\ \$images(\$image)\ \}\n\}\n\nproc\ ::InstallJammer::SetImage\ \{\ w\ id\ image\ \}\ \{\n\ \ \ \ set\ image\ \[::InstallJammer::Image\ \$id\ \$image\]\n\ \ \ \ if\ \{\[string\ length\ \$image\]\}\ \{\ \$w\ configure\ -image\ \$image\ \}\n\}\n\nproc\ ::InstallJammer::ImageExists\ \{img\}\ \{\n\ \ \ \ global\ images\n\ \ \ \ return\ \[info\ exists\ images(\$img)\]\n\}\n\nproc\ ::InstallJammer::UpdateWidgets\ \{\ args\ \}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ if\ \{\$info(SilentMode)\}\ \{\ return\ \}\n\n\ \ \ \ array\ set\ _args\ \{\n\ \ \ \ \ \ \ \ -update\ \ \ \ \ \ \ \ \ \ 0\n\ \ \ \ \ \ \ \ -buttons\ \ \ \ \ \ \ \ \ 1\n\ \ \ \ \ \ \ \ -widgets\ \ \ \ \ \ \ \ \ \{\}\n\ \ \ \ \ \ \ \ -updateidletasks\ 0\n\ \ \ \ \}\n\n\ \ \ \ array\ set\ _args\ \$args\n\n\ \ \ \ if\ \{!\[info\ exists\ _args(-wizard)\]\}\ \{\ set\ _args(-wizard)\ \$info(Wizard)\ \}\n\ \ \ \ set\ wizard\ \$_args(-wizard)\n\n\ \ \ \ if\ \{!\[winfo\ exists\ \$wizard\]\}\ \{\ return\ \}\n\n\ \ \ \ if\ \{!\[info\ exists\ _args(-step)\]\}\ \{\ set\ _args(-step)\ \[\$wizard\ raise\]\ \}\n\ \ \ \ set\ step\ \$_args(-step)\n\n\ \ \ \ if\ \{!\[string\ length\ \$step\]\}\ \{\ return\ \}\n\n\ \ \ \ if\ \{!\[llength\ \$_args(-widgets)\]\}\ \{\ set\ _args(-widgets)\ \[\$step\ widgets\]\ \}\n\ \ \ \ \n\ \ \ \ foreach\ widget\ \$_args(-widgets)\ \{\n\ \ \ \ \ \ \ \ set\ w\ \[\$step\ widget\ get\ \$widget\]\n\ \ \ \ \ \ \ \ if\ \{!\[winfo\ exists\ \$w\]\}\ \{\ continue\ \}\n\n\ \ \ \ \ \ \ \ switch\ --\ \[\$step\ widget\ type\ \$widget\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \"progress\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ value\ \[::InstallJammer::GetText\ \$step\ \$widget\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ is\ integer\ -strict\ \$value\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$w\ configure\ -value\ \$value\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"image\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetImage\ \$w\ \$step\ \$widget\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"text\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetText\ \$w\ \$step\ \$widget\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\$_args(-buttons)\}\ \{\ ::InstallJammer::UpdateWizardButtons\ \$wizard\ \$step\ \}\n\n\ \ \ \ if\ \{\$_args(-update)\}\ \{\ set\ _args(-updateidletasks)\ 0\;\ update\ \}\n\n\ \ \ \ if\ \{\$_args(-updateidletasks)\}\ \{\ update\ idletasks\ \}\n\}\n\nproc\ ::InstallJammer::DirIsWritable\ \{dir\}\ \{\n\ \ \ \ if\ \{\$::tcl_platform(platform)\ eq\ \"windows\"\}\ \{\n\tif\ \{\[catch\ \{file\ attributes\ \$dir\}\ error\]\}\ \{\ return\ 0\ \}\n\treturn\ 1\n\ \ \ \ \}\n\ \ \ \ return\ \[file\ writable\ \$dir\]\n\}\n\nproc\ ::InstallJammer::Normalize\ \{\ file\ \{style\ none\}\ \}\ \{\n\ \ \ \ if\ \{\[string\ length\ \$file\]\}\ \{\n\ \ \ \ \ \ \ \ set\ file\ \[eval\ file\ join\ \[file\ split\ \$file\]\]\n\ \ \ \ \ \ \ \ switch\ --\ \$style\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \"unix\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ index\ \$file\ 1\]\ ==\ \":\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ file\ \[string\ range\ \$file\ 2\ end\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"windows\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ file\ \[string\ map\ \[list\ /\ \\\\\]\ \$file\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$file\n\}\n\nproc\ ::InstallJammer::RelativeFile\ \{\ file\ \}\ \{\n\ \ \ \ if\ \{\[file\ pathtype\ \$file\]\ eq\ \"relative\"\}\ \{\n\ \ \ \ \ \ \ \ set\ file\ \[::InstallJammer::SubstText\ \"<%InstallDir%>/\$file\"\]\n\ \ \ \ \}\n\ \ \ \ return\ \[::InstallJammer::Normalize\ \$file\]\n\}\n\nproc\ ::InstallJammer::RollbackName\ \{\ file\ \}\ \{\n\ \ \ \ global\ info\n\ \ \ \ return\ \[file\ join\ \[file\ dirname\ \$file\]\ .\$info(InstallID).\[file\ tail\ \$file\]\]\n\}\n\nproc\ ::InstallJammer::SaveForRollback\ \{file\}\ \{\n\ \ \ \ file\ rename\ -force\ \$file\ \[::InstallJammer::RollbackName\ \$file\]\n\}\n\nproc\ ::InstallJammer::WindowsDir\ \{\ dir\ \}\ \{\n\ \ \ \ if\ \{\[catch\ \{\ ::Windows::folder\ \$dir\ \}\ windir\]\}\ \{\ set\ windir\ \"\"\ \}\n\ \ \ \ if\ \{\[string\ length\ \$windir\]\}\ \{\ return\ \[Normalize\ \$windir\ windows\]\ \}\n\n\ \ \ \ ##\ We\ couldn't\ find\ the\ directory\ they\ were\ looking\ for.\n\ \ \ \ ##\ See\ if\ we\ can\ give\ them\ something.\n\n\ \ \ \ if\ \{\[string\ match\ \"COMMON_*\"\ \$dir\]\}\ \{\n\ \ \ \ \ \ \ \ ##\ Windows\ 9x\ doesn't\ support\ COMMON_*\ directories,\ so\ let's\n\ \ \ \ \ \ \ \ ##\ see\ if\ we\ can\ give\ them\ the\ normal\ one.\n\ \ \ \ \ \ \ \ set\ chk\ \[string\ range\ \$dir\ 7\ end\]\n\ \ \ \ \ \ \ \ if\ \{\[catch\ \{\ ::Windows::folder\ \$chk\ \}\ windir\]\}\ \{\ set\ windir\ \"\"\ \}\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$windir\]\}\ \{\ return\ \[Normalize\ \$windir\ windows\]\ \}\n\ \ \ \ \}\n\n\ \ \ \ set\ key\ \{HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\}\n\n\ \ \ \ switch\ --\ \$dir\ \{\n\t\"WINDOWS\"\ \{\n\t\ \ \ \ if\ \{\[info\ exists\ ::env(windir)\]\}\ \{\n\t\tset\ windir\ \$::env(windir)\n\t\ \ \ \ \}\ elseif\ \{\[info\ exists\ ::env(SYSTEMROOT)\]\}\ \{\n\t\tset\ windir\ \$::env(SYSTEMROOT)\n\t\ \ \ \ \}\ elseif\ \{!\[catch\ \{registry\ get\ \$key\ SystemRoot\}\ result\]\}\ \{\n\t\tset\ windir\ \$result\n\t\ \ \ \ \}\ else\ \{\n\t\tset\ windir\ \"C:\\\\Windows\"\n\t\ \ \ \ \}\n\t\}\n\n\t\"PROGRAM_FILES\"\ \{\n\t\ \ \ \ if\ \{\[info\ exists\ ::env(ProgramFiles)\]\}\ \{\n\t\tset\ windir\ \$::env(ProgramFiles)\n\t\ \ \ \ \}\ elseif\ \{!\[catch\ \{registry\ get\ \$key\ ProgramFilesDir\}\ result\]\}\ \{\n\t\tset\ windir\ \$result\n\t\ \ \ \ \}\ else\ \{\n\t\tset\ windir\ \"C:\\\\Program\ Files\"\n\t\ \ \ \ \}\n\t\}\n\n\t\"SYSTEM\"\ \{\n\t\ \ \ \ set\ windir\ \[file\ join\ \[WindowsDir\ WINDOWS\]\ system\]\n\t\}\n\n\t\"SYSTEM32\"\ \{\n\t\ \ \ \ set\ windir\ \[file\ join\ \[WindowsDir\ WINDOWS\]\ system32\]\n\t\}\n\n\t\"QUICK_LAUNCH\"\ \{\n\t\ \ \ \ set\ windir\ \[WindowsDir\ APPDATA\]\n\t\ \ \ \ set\ windir\ \[file\ join\ \$windir\ \\\n\t\ \ \ \ \t\"Microsoft\"\ \"Internet\ Explorer\"\ \"Quick\ Launch\"\]\n\t\}\n\n\t\"WALLPAPER\"\ \{\n\t\ \ \ \ set\ windir\ \[registry\ get\ \$key\ WallPaperDir\]\n\t\}\n\n\tdefault\ \{\n\t\ \ \ \ ##\ Couldn't\ find\ a\ directory.\ \ Just\ return\ the\ string.\n\t\ \ \ \ return\ <%\$dir%>\n\t\}\n\ \ \ \ \}\n\n\ \ \ \ return\ \[Normalize\ \$windir\ windows\]\n\}\n\nproc\ ::InstallJammer::SetupRegVirtualText\ \{\}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ set\ env\ \ \ \ \ \ \ \ \{HKEY_LOCAL_MACHINE\}\n\ \ \ \ set\ user\ \ \ \ \ \ \ \{HKEY_CURRENT_USER\}\n\ \ \ \ set\ current\ \ \ \ \{HKEY_LOCAL_MACHINE\}\n\ \ \ \ append\ env\ \ \ \ \ \{\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\}\n\ \ \ \ append\ current\ \{\\Software\\Microsoft\\Windows\\CurrentVersion\}\n\n\ \ \ \ set\ info(REG_USER_ENV)\ \ \ \ \ \ \ \ \"\$user\\\\Environment\"\n\ \ \ \ set\ info(REG_SYSTEM_ENV)\ \ \ \ \ \ \"\$env\\\\Environment\"\n\ \ \ \ set\ info(REG_UNINSTALL)\ \ \ \ \ \ \ \"\$current\\\\Uninstall\"\n\ \ \ \ set\ info(REG_CURRENT_VERSION)\ \"\$current\"\n\n\ \ \ \ return\n\}\n\nproc\ ::InstallJammer::SetWindowsPlatform\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ set\ string\ Windows\n\n\ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ switch\ --\ \$::tcl_platform(os)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \"Windows\ 95\"\ \{\ set\ string\ \"Win95\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \"Windows\ 98\"\ \{\ set\ string\ \"Win98\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \"Windows\ NT\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ switch\ --\ \$::tcl_platform(osVersion)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"4.0\"\ \{\ set\ string\ \"WinNT\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"5.0\"\ \{\ set\ string\ \"Win2k\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"5.1\"\ \{\ set\ string\ \"WinXP\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"5.2\"\ \{\ set\ string\ \"Win2003\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"6.0\"\ \{\ set\ string\ \"Vista\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ set\ info(WindowsPlatform)\ \$string\n\}\n\nproc\ ::InstallJammer::SubstVar\ \{\ var\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ ##\ See\ if\ this\ is\ a\ virtual\ text\ variable\ that\ exists\ in\n\ \ \ \ ##\ our\ message\ catalog.\ \ If\ it\ does,\ we\ want\ to\ use\ the\n\ \ \ \ ##\ language-specific\ version\ instead\ of\ a\ generic.\n\ \ \ \ if\ \{\[::msgcat::mcexists\ \$var\]\}\ \{\ return\ \[::msgcat::mc\ \$var\]\ \}\n\n\ \ \ \ ##\ If\ this\ variable\ exists\ in\ the\ info\ array,\ return\ its\ value.\n\ \ \ \ if\ \{\[info\ exists\ info(\$var)\]\}\ \{\n\tset\ string\ \$info(\$var)\n\tif\ \{\[lsearch\ -exact\ \$conf(SubstDirVars)\ \$var\]\ >\ -1\}\ \{\n\t\ \ \ \ set\ string\ \[Normalize\ \$string\ \$::tcl_platform(platform)\]\n\t\}\n\ \ \ \treturn\ \$string\n\ \ \ \ \}\n\n\ \ \ \ switch\ -glob\ --\ \$var\ \{\n\t\"Date\ *\"\ \{\n\t\ \ \ \ set\ format\ \[join\ \[lrange\ \$var\ 1\ end\]\]\n\t\ \ \ \ set\ string\ \[clock\ format\ \[clock\ seconds\]\ -format\ \$format\]\n\t\}\n\n\t\"Dir\ *\"\ \{\n\t\ \ \ \ set\ string\ \[join\ \[lrange\ \$var\ 1\ end\]\]\n\t\ \ \ \ set\ string\ \[Normalize\ \$string\ \$::tcl_platform(platform)\]\n\t\}\n\n\ \ \ \ \ \ \ \ \"DiskSpace\ *\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ space\ \ \[lindex\ \$var\ 1\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ string\ \[::InstallJammer::FormatDiskSpace\ \$space\]\n\ \ \ \ \ \ \ \ \}\n\n\t\"FileGroup\ *\"\ \{\n\t\ \ \ \ set\ group\ \[join\ \[lrange\ \$var\ 1\ end\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ obj\ \[FindObjByName\ \$group\ \[FileGroups\ children\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$obj\]\}\ \{\n\t\tset\ string\ \[\$obj\ directory\]\n\t\tset\ string\ \[Normalize\ \$string\ \$::tcl_platform(platform)\]\n\t\ \ \ \ \}\n\t\}\n\n\t\"GUID\"\ \{\n\t\ \ \ \ set\ string\ \[::InstallJammer::guid\]\n\t\ \ \ \ set\ info(LastGUID)\ \$string\n\t\}\n\n\ \ \ \ \ \ \ \ \"Home\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ string\ \[::InstallJammer::HomeDir\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"InstallInfoDir\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ string\ \[::InstallJammer::InstallInfoDir\]\n\ \ \ \ \ \ \ \ \}\n\n\t\"RegValue\ *\"\ \{\n\t\ \ \ \ set\ list\ \[lrange\ \$var\ 1\ end\]\n\t\ \ \ \ set\ string\ \[::Windows::GetKey\ \[lindex\ \$list\ 0\]\ \[lindex\ \$list\ 1\]\]\n\t\}\n\n\ \ \ \ \ \ \ \ \"SpaceAvailable\"\ -\ \"SpaceAvailable\ *\"\ \{\n\t\ \ \ \ set\ dir\ \[string\ trim\ \[join\ \[lrange\ \$var\ 1\ end\]\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[string\ length\ \$dir\]\}\ \{\ set\ dir\ \$info(InstallDir)\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ set\ string\ \[::InstallJammer::GetFreeDiskSpace\ \$dir\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"Tail\ *\"\ \{\n\t\ \ \ \ set\ file\ \[join\ \[lrange\ \$var\ 1\ end\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ string\ \[file\ tail\ \$file\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"Temp\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ string\ \[::InstallJammer::TmpDir\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"UUID\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ string\ \[::InstallJammer::uuid\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(LastUUID)\ \$string\n\ \ \ \ \ \ \ \ \}\n\n\tdefault\ \{\n\t\ \ \ \ set\ string\ \"<%\$var%>\"\n\n\t\ \ \ \ ##\ If\ the\ string\ is\ all\ uppercase\ and\ didn't\ match\ something\n\t\ \ \ \ ##\ in\ the\ info\ array,\ it's\ a\ Windows\ directory.\n\t\ \ \ \ if\ \{\[string\ length\ \$var\]\ &&\ \$var\ eq\ \[string\ toupper\ \$var\]\}\ \{\n\t\tset\ string\ \[::InstallJammer::WindowsDir\ \$var\]\n\t\ \ \ \ \}\n\t\}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$string\n\}\n\nproc\ ::InstallJammer::SubstForEval\ \{\ string\ \}\ \{\n\ \ \ \ set\ map\ \[list\ \"<%\"\ \{\[::InstallJammer::SubstText\ <%\}\ \"%>\"\ \{%>\]\}\]\n\ \ \ \ return\ \[string\ map\ \$map\ \$string\]\n\}\n\nproc\ ::InstallJammer::SubstForPipe\ \{\ string\ \}\ \{\n\ \ \ \ set\ list\ \[list\]\n\ \ \ \ foreach\ arg\ \$string\ \{\n\ \ \ \ \ \ \ \ lappend\ list\ \[::InstallJammer::SubstText\ \$arg\]\n\ \ \ \ \}\n\ \ \ \ return\ \$list\n\}\n\nproc\ ::InstallJammer::SubstText\ \{\ str\ \{num\ 0\}\ \}\ \{\n\ \ \ \ global\ conf\n\n\ \ \ \ if\ \{\$num\ >\ \$conf(VirtualTextRecursionLimit)\}\ \{\ return\ \$str\ \}\n\n\ \ \ \ if\ \{!\[string\ length\ \$str\]\}\ \{\ return\ \}\n\n\ \ \ \ set\ s\ \$str\n\ \ \ \ set\ s\ \[string\ map\ \$conf(VirtualTextMap)\ \$s\]\n\ \ \ \ set\ s\ \[subst\ -novariables\ \$s\]\n\ \ \ \ if\ \{\$str\ ne\ \$s\}\ \{\ set\ s\ \[::InstallJammer::SubstText\ \$s\ \[incr\ num\]\]\ \}\n\n\ \ \ \ return\ \$s\n\}\n\nproc\ ::InstallJammer::TmpDir\ \{\ \{file\ \"\"\}\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ if\ \{!\[info\ exists\ info(Temp)\]\ ||\ !\[file\ exists\ \$info(Temp)\]\}\ \{\n\tif\ \{\[info\ exists\ ::env(TEMP)\]\}\ \{\ lappend\ dirs\ \$::env(TEMP)\ \}\n\tif\ \{\[info\ exists\ ::env(TMP)\]\}\ \ \{\ lappend\ dirs\ \$::env(TMP)\ \ \}\n\ \ \ \ \ \ \ \ if\ \{\$conf(windows)\}\ \{\n\t\ \ \ \ lappend\ dirs\ C:/Windows/Temp\n\t\ \ \ \ lappend\ dirs\ C:/WINNT/Temp\n\t\}\ else\ \{\n\t\ \ \ \ lappend\ dirs\ /usr/tmp\ /tmp\ /var/tmp\n\t\}\n\n\ \ \ \ \ \ \ \ set\ subdir\ ijtmp_\[::InstallJammer::uuid\]\n\n\tforeach\ dir\ \$dirs\ \{\n\t\ \ \ \ if\ \{\[DirIsWritable\ \$dir\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ tmpname\ \[file\ join\ \$dir\ \$subdir\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ file\ mkdir\ \$tmpname\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ info(Temp)\ \[Normalize\ \$tmpname\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ break\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\t\}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[string\ length\ \$file\]\}\ \{\n\treturn\ \[Normalize\ \[file\ join\ \$info(Temp)\ \$file\]\]\n\ \ \ \ \}\ else\ \{\n\treturn\ \$info(Temp)\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::GetInstallInfoDir\ \{\ \{create\ 0\}\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ if\ \{!\[info\ exists\ info(InstallInfoDir)\]\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ root\ \[::InstallJammer::WindowsDir\ PROGRAM_FILES\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ dir\ \ \[file\ join\ \$root\ \"InstallJammer\ Registry\"\]\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$info(Username)\ eq\ \"root\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ dir\ \"/var/lib/installjammer\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ dir\ \"\[::InstallJammer::HomeDir\]/.installjammerinfo\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ set\ dir\ \[file\ join\ \$dir\ \$info(ApplicationID)\]\n\n\ \ \ \ \ \ \ \ set\ info(InstallInfoDir)\ \[Normalize\ \$dir\]\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\$create\ &&\ !\[file\ exists\ \$info(InstallInfoDir)\]\}\ \{\n\ \ \ \ \ \ \ \ ::InstallJammer::CreateDir\ \$info(InstallInfoDir)\ 0\n\ \ \ \ \ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ file\ attributes\ \[file\ dirname\ \$info(InstallInfoDir)\]\ -hidden\ 1\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$info(InstallInfoDir)\n\}\n\nproc\ ::InstallJammer::InstallInfoDir\ \{\ \{file\ \"\"\}\ \}\ \{\n\ \ \ \ set\ dir\ \[::InstallJammer::GetInstallInfoDir\ 1\]\n\ \ \ \ if\ \{\[string\ length\ \$file\]\}\ \{\ append\ dir\ /\$file\ \}\n\ \ \ \ return\ \$dir\n\}\n\nproc\ ::InstallJammer::SetPermissions\ \{\ file\ perm\ \}\ \{\n\ \ \ \ if\ \{!\[string\ length\ \$perm\]\}\ \{\ return\ \}\n\n\ \ \ \ if\ \{\$::tcl_platform(platform)\ eq\ \"windows\"\}\ \{\n\tif\ \{\[string\ length\ \$perm\]\ >\ 4\}\ \{\ return\ \}\n\tlassign\ \[split\ \$perm\ \"\"\]\ a\ h\ r\ s\n\tfile\ attributes\ \$file\ -archive\ \$a\ -hidden\ \$h\ -readonly\ \$r\ -system\ \$s\n\treturn\n\ \ \ \ \}\n\ \ \ \ file\ attributes\ \$file\ -permissions\ \$perm\n\}\n\nproc\ ::InstallJammer::WriteDoneFile\ \{\ \{dir\ \"\"\}\ \}\ \{\n\ \ \ \ if\ \{!\[string\ length\ \$dir\]\}\ \{\ set\ dir\ \[file\ dirname\ \[info\ nameofexe\]\]\ \}\n\ \ \ \ close\ \[open\ \[file\ join\ \$dir\ .done\]\ w\]\n\}\n\n##\ This\ proc\ attempts\ to\ find\ any\ InstallJammer\ temporary\ directories\ laying\n##\ around\ and\ clean\ them\ up.\ \ If\ a\ file\ called\ .done\ is\ in\ the\ directory,\n##\ we\ know\ the\ InstallJammer\ program\ using\ that\ directory\ has\ finished\ with\ it,\n##\ and\ it's\ ok\ to\ remove.\nproc\ ::InstallJammer::CleanupTmpDirs\ \{\}\ \{\n\ \ \ \ if\ \{\[info\ exists\ ::conf(debugging)\]\ &&\ \$::conf(debugging)\}\ \{\ return\ \}\n\n\ \ \ \ set\ tmp\ \[file\ dirname\ \[TmpDir\]\]\n\ \ \ \ foreach\ dir\ \[glob\ -nocomplain\ -type\ d\ -dir\ \$tmp\ ijtmp_*\]\ \{\n\tif\ \{!\[DirIsEmpty\ \$dir\]\}\ \{\n\t\ \ \ \ if\ \{!\[file\ exists\ \[file\ join\ \$dir\ .done\]\]\}\ \{\ continue\ \}\n\t\}\n\tcatch\ \{\ file\ delete\ -force\ \$dir\ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::EvalCondition\ \{\ condition\ \}\ \{\n\ \ \ \ if\ \{\[string\ is\ true\ \ \$condition\]\}\ \{\ return\ 1\ \}\n\ \ \ \ if\ \{\[string\ is\ false\ \$condition\]\}\ \{\ return\ 0\ \}\n\n\ \ \ \ set\ test\ \[::InstallJammer::SubstForEval\ \$condition\]\n\n\ \ \ \ if\ \{!\[string\ length\ \$test\]\}\ \{\ return\ 1\ \}\n\ \ \ \ if\ \{\[catch\ \{expr\ \[subst\ \$test\]\}\ result\]\}\ \{\n\ \ \ \ \ \ \ \ return\ -code\ error\ \"Error\ in\ condition\ '\$condition':\ \$result\"\n\ \ \ \ \}\n\ \ \ \ return\ \$result\n\}\n\nproc\ ::InstallJammer::HomeDir\ \{\}\ \{\n\ \ \ \ return\ \[file\ normalize\ ~\]\n\}\n\nproc\ ::InstallJammer::PauseInstall\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ if\ \{\[info\ exists\ conf(pause)\]\}\ \{\ close\ \[open\ \$conf(pause)\ w\]\ \}\n\}\n\nproc\ ::InstallJammer::ContinueInstall\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ if\ \{\[info\ exists\ conf(pause)\]\}\ \{\ file\ delete\ \$conf(pause)\ \}\n\}\n\nproc\ ::InstallJammer::StopInstall\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\ \ \ \ if\ \{\[info\ exists\ conf(stop)\]\}\ \{\n\ \ \ \ \ \ \ \ close\ \[open\ \$conf(stop)\ w\]\n\ \ \ \ \ \ \ \ set\ info(InstallStopped)\ 1\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::PauseCheck\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ while\ \{\[file\ exists\ \$conf(pause)\]\}\ \{\n\tif\ \{\[file\ exists\ \$conf(stop)\]\}\ \{\n\t\ \ \ \ set\ info(InstallStopped)\ 1\n\ \ \ \ \ \ \ \ \ \ \ \ return\ 0\n\t\}\n\tafter\ 500\n\ \ \ \ \}\n\n\ \ \ \ return\ 1\n\}\n\nproc\ ::InstallJammer::UninstallFile\ \{file\}\ \{\n\ \ \ \ file\ delete\ -force\ \$file\n\}\n\nproc\ ::InstallJammer::UninstallDirectory\ \{\ dir\ \{force\ \"\"\}\ \}\ \{\n\ \ \ \ file\ delete\ \$force\ \$dir\n\}\n\n##\ Uninstall\ a\ registry\ key.\ \ If\ value\ is\ specified,\ we\ only\ want\ to\ delete\n##\ that\ value\ from\ the\ registry\ key.\ \ If,\ once\ the\ value\ has\ been\ deleted,\n##\ the\ registry\ key\ is\ empty,\ we\ will\ delete\ that\ as\ well.\nproc\ ::InstallJammer::UninstallRegistryKey\ \{key\ \{value\ \"\"\}\}\ \{\n\ \ \ \ if\ \{!\[lempty\ \$value\]\}\ \{\n\tcatch\ \{\ registry\ delete\ \$key\ \$value\ \}\n\tif\ \{\[catch\ \{\ registry\ keys\ \$key\ \}\ keys\]\}\ \{\ return\ \}\n\tif\ \{\[catch\ \{\ registry\ values\ \$key\ \}\ values\]\}\ \{\ return\ \}\n\tif\ \{\[lempty\ \$keys\]\ &&\ \[lempty\ \$values\]\}\ \{\n\t\ \ \ \ UninstallRegistryKey\ \$key\n\t\}\n\ \ \ \ \}\ else\ \{\n\tcatch\ \{\ registry\ delete\ \$key\ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::LogDir\ \{dir\}\ \{\n\ \ \ \ global\ info\n\ \ \ \ set\ dir\ \[Normalize\ \$dir\]\n\ \ \ \ if\ \{!\[string\ match\ \$info(InstallInfoDir)*\ \$dir\]\n\ \ \ \ \ \ \ \ &&\ !\[string\ match\ \$info(Temp)*\ \$dir\]\}\ \{\n\ \ \ \ \ \ \ \ ::InstallJammer::InstallLog\ \":DIR\ \[list\ \$dir\]\"\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::LogFile\ \{file\}\ \{\n\ \ \ \ global\ info\n\ \ \ \ set\ file\ \[Normalize\ \$file\]\n\ \ \ \ if\ \{!\[string\ match\ \$info(InstallInfoDir)*\ \$file\]\n\ \ \ \ \ \ \ \ &&\ !\[string\ match\ \$info(Temp)*\ \$file\]\}\ \{\n\ \ \ \ \ \ \ \ ::InstallJammer::InstallLog\ \":FILE\ \[list\ \$file\]\"\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::SetVersionInfo\ \{\ file\ \{version\ \"\"\}\ \}\ \{\n\ \ \ \ global\ info\n\ \ \ \ global\ versions\n\ \ \ \ if\ \{!\[string\ length\ \$version\]\}\ \{\ set\ version\ \$info(InstallVersion)\ \}\n\ \ \ \ set\ versions(\$file)\ \$version\n\}\n\nproc\ ::InstallJammer::MessageBox\ \{\ args\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ widg\n\n\ \ \ \ set\ win\ \ .__message_box\n\ \ \ \ set\ args\ \[linsert\ \$args\ 0\ -type\ ok\ -buttonwidth\ 12\]\n\ \ \ \ if\ \{\[info\ exists\ conf(cmdline)\]\ &&\ \$conf(cmdline)\}\ \{\n\ \ \ \ \ \ \ \ set\ usenative\ 1\n\ \ \ \ \ \ \ \ set\ args\ \[linsert\ \$args\ 0\ -title\ \"InstallJammer\"\]\n\ \ \ \ \}\ elseif\ \{\[info\ exists\ widg(InstallJammer)\]\}\ \{\n\ \ \ \ \ \ \ \ set\ usenative\ 1\n\ \ \ \ \ \ \ \ set\ win\ \ \[::InstallJammer::TopName\ \$win\]\n\ \ \ \ \ \ \ \ set\ args\ \[linsert\ \$args\ 0\ -title\ \"InstallJammer\"\]\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ set\ usenative\ 0\n\ \ \ \ \ \ \ \ set\ parent\ \[::InstallJammer::TransientParent\]\n\ \ \ \ \ \ \ \ set\ args\ \[linsert\ \$args\ 0\ -usenative\ \$usenative\ -parent\ \$parent\]\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\$usenative\ &&\ !\[string\ length\ \$parent\]\}\ \{\ set\ _args(-transient)\ 0\ \}\n\n\ \ \ \ array\ set\ _args\ \$args\n\ \ \ \ set\ type\ \$_args(-type)\n\n\ \ \ \ if\ \{!\$usenative\ &&\ \$type\ ne\ \"user\"\}\ \{\n\ \ \ \ \ \ \ \ foreach\ button\ \{Abort\ Retry\ Ignore\ OK\ Yes\ No\ Cancel\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ lbutton\ \[string\ tolower\ \$button\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ first\ \$lbutton\ \$_args(-type)\]\ >\ -1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ buttons\ \$lbutton\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ _args(-buttons)\ \[::InstallJammer::SubstText\ <%\$button%>\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ set\ _args(-type)\ user\n\ \ \ \ \}\n\n\ \ \ \ set\ result\ \[eval\ \[list\ MessageDlg\ \$win\]\ \[array\ get\ _args\]\]\n\n\ \ \ \ if\ \{!\$usenative\ &&\ \$type\ ne\ \"user\"\}\ \{\ return\ \[lindex\ \$buttons\ \$result\]\ \}\n\ \ \ \ return\ \$result\n\}\n\nproc\ ::InstallJammer::Message\ \{\ args\ \}\ \{\n\ \ \ \ set\ title\ \"InstallJammer\"\n\ \ \ \ if\ \{\[info\ exists\ ::tk_patchLevel\]\}\ \{\n\ \ \ \ \ \ \ \ eval\ \[list\ ::InstallJammer::MessageBox\ -title\ \$title\]\ \$args\n\ \ \ \ \}\ else\ \{\n\tset\ data(-title)\ \$title\n\tarray\ set\ data\ \$args\n\tif\ \{!\[info\ exists\ data(-message)\]\}\ \{\ return\ \}\n\tputs\ stdout\ \"\$data(-title):\ \$data(-message)\"\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::HandleThreadError\ \{\ tid\ errorMsg\ \}\ \{\n\ \ \ \ set\ message\ \"Error\ in\ thread\ \$tid:\ \$errorMsg\"\n\ \ \ \ ::InstallJammer::MessageBox\ -message\ \$message\n\}\n\nproc\ ::InstallJammer::ChooseDirectory\ \{\ args\ \}\ \{\n\ \ \ \ global\ conf\n\n\ \ \ \ if\ \{0\ &&\ \$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ array\ set\ _args\ \$args\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ _args(-message)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ _args(-title)\ \$_args(-message)\n\ \ \ \ \ \ \ \ \ \ \ \ unset\ _args(-message)\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ set\ dir\ \[eval\ tk_chooseDirectory\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \[list\ -parent\ \[lindex\ \$conf(ParentWindow)\ 0\]\]\ \[array\ get\ _args\]\]\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ if\ \{\[llength\ \$conf(ParentWindow)\]\ >\ 1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ wm\ withdraw\ \[lindex\ \$conf(ParentWindow)\ end\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ set\ dir\ \[eval\ ::ChooseDirectory\ .__choose_directory\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \[list\ -parent\ \[::InstallJammer::TransientParent\]\]\ \$args\]\n\n\ \ \ \ \ \ \ \ if\ \{\[llength\ \$conf(ParentWindow)\]\ >\ 1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ wm\ deiconify\ \[lindex\ \$conf(ParentWindow)\ end\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$dir\n\}\n\nproc\ ::InstallJammer::CommandExists\ \{\ proc\ \}\ \{\n\ \ \ \ return\ \[string\ length\ \[info\ commands\ \$proc\]\]\n\}\n\nproc\ ::InstallJammer::uuid\ \{\}\ \{\n\ \ \ \ global\ conf\n\n\ \ \ \ if\ \{\$conf(windows)\}\ \{\ return\ \[lindex\ \[::Windows::guid\]\ 0\]\ \}\n\n\ \ \ \ set\ fp\ \[open\ /dev/urandom\]\n\ \ \ \ fconfigure\ \$fp\ -translation\ binary\n\ \ \ \ foreach\ x\ \{4\ 2\ 2\ 6\}\ \{\n\ \ \ \ \ \ \ \ binary\ scan\ \[read\ \$fp\ \$x\]\ h*\ hex\n\ \ \ \ \ \ \ \ lappend\ list\ \$hex\n\ \ \ \ \}\n\ \ \ \ close\ \$fp\n\ \ \ \ return\ \[string\ toupper\ \[join\ \$list\ -\]\]\n\}\n\nproc\ ::InstallJammer::guid\ \{\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ if\ \{\$conf(windows)\}\ \{\ return\ \[::Windows::guid\]\ \}\n\ \ \ \ return\ \\\{\[string\ toupper\ \[::InstallJammer::uuid\]\]\\\}\n\}\n\nproc\ ::InstallJammer::ObjExists\ \{\ obj\ \}\ \{\n\ \ \ \ return\ \[info\ exists\ ::InstallJammer::ObjMap(\[namespace\ tail\ \$obj\])\]\n\}\n\nproc\ ::InstallJammer::ReadMessageCatalog\ \{\ catalog\ \}\ \{\n\ \ \ \ eval\ \[read_file\ \[file\ join\ \$::installkit::root\ catalogs\ \$catalog\]\]\n\}\n\nproc\ ::InstallJammer::Wrap\ \{\ args\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ set\ include\ 1\n\ \ \ \ if\ \{\[set\ x\ \[lsearch\ -exact\ \$args\ -noinstall\]\]\ >\ -1\}\ \{\n\ \ \ \ \ \ \ \ set\ include\ 0\n\ \ \ \ \ \ \ \ set\ args\ \[lreplace\ \$args\ \$x\ \$x\]\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\$include\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\$::tcl_platform(platform)\ eq\ \"windows\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ wintcl\ \[file\ join\ \$::installkit::root\ lib\ Wintcl\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ args\ \[linsert\ \$args\ 0\ -package\ \$wintcl\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ set\ pkgdir\ \[file\ join\ \$::installkit::root\ lib\ InstallJammer\]\n\ \ \ \ \ \ \ \ set\ args\ \[linsert\ \$args\ 0\ -package\ \$pkgdir\]\n\n\ \ \ \ \ \ \ \ set\ pkgdir\ \[file\ join\ \$::installkit::root\ lib\ \$info(Platform)\]\n\ \ \ \ \ \ \ \ if\ \{\[file\ exists\ \$pkgdir\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ args\ \[linsert\ \$args\ 0\ -package\ \$pkgdir\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ eval\ ::installkit::wrap\ \$args\n\}\n\nproc\ ::InstallJammer::Grab\ \{\ command\ args\ \}\ \{\n\ \ \ \ variable\ GrabStack\n\n\ \ \ \ if\ \{!\[info\ exists\ GrabStack\]\}\ \{\ set\ GrabStack\ \[list\]\ \}\n\n\ \ \ \ switch\ --\ \$command\ \{\n\ \ \ \ \ \ \ \ \"current\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[lindex\ \$GrabStack\ end\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"stack\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$GrabStack\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"release\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ window\ \[lindex\ \$args\ 0\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ search\ \[lsearch\ -exact\ \$GrabStack\ \$window\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$search\ <\ 0\}\ \{\ return\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$search\ !=\ \[expr\ \{\[llength\ \$GrabStack\]\ -\ 1\}\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ -code\ error\ \"\$window\ is\ not\ last\ in\ the\ grab\ stack.\"\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ release\ \$window\n\ \ \ \ \ \ \ \ \ \ \ \ set\ GrabStack\ \[lreplace\ \$GrabStack\ end\ end\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[llength\ \$GrabStack\]\}\ \{\ grab\ \[lindex\ \$GrabStack\ end\]\ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \"set\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ window\ \[lindex\ \$args\ 0\]\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ \$window\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ GrabStack\ \$window\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ default\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ grab\ \$command\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ GrabStack\ \$command\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\n\}\n\nproc\ ::InstallJammer::HasKDEDesktop\ \{\}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ set\ home\ \[::InstallJammer::HomeDir\]\n\ \ \ \ set\ kde\ \ \[file\ join\ \$home\ .kde\]\n\n\ \ \ \ if\ \{!\[file\ exists\ \$kde\]\}\ \{\ return\ 0\ \}\n\n\ \ \ \ if\ \{!\[info\ exists\ info(KDEDesktop)\]\ ||\ \[lempty\ \$info(KDEDesktop)\]\}\ \{\n\tset\ globals\ \[file\ join\ \$kde\ share\ config\ kdeglobals\]\n\tset\ desktop\ \[file\ join\ \$home\ Desktop\]\n\tif\ \{\[catch\ \{open\ \$globals\}\ fp\]\}\ \{\ return\ 0\ \}\n\twhile\ \{\[gets\ \$fp\ line\]\ !=\ -1\}\ \{\n\t\ \ \ \ if\ \{\[regexp\ \{^Desktop=(\[^\\n\].*)\\n\}\ \$line\\n\ trash\ desktop\]\}\ \{\n\t\tregsub\ -all\ \{\\\$(\[A-Za-z0-9\]+)\}\ \$desktop\ \{\$::env(\\1)\}\ desktop\n\t\tbreak\n\t\ \ \ \ \}\n\t\}\n\tclose\ \$fp\n\tset\ info(KDEDesktop)\ \$desktop\n\ \ \ \ \}\n\n\ \ \ \ return\ \[file\ exists\ \$info(KDEDesktop)\]\n\}\n\nproc\ ::InstallJammer::HasGnomeDesktop\ \{\}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ set\ home\ \[::InstallJammer::HomeDir\]\n\n\ \ \ \ foreach\ dir\ \[list\ .gnome-desktop\ Desktop\]\ \{\n\ \ \ \ \ \ \ \ set\ desktop\ \[file\ join\ \$home\ \$dir\]\n\ \ \ \ \ \ \ \ if\ \{\[file\ exists\ \$desktop\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ info(GnomeDesktop)\ \$desktop\n\ \ \ \ \ \ \ \ \ \ \ \ break\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ if\ \{\[info\ exists\ info(GnomeDesktop)\]\ &&\ \[file\ exists\ \$info(GnomeDesktop)\]\}\ \{\n\ \ \ \ \ \ \ \ return\ 1\n\ \ \ \ \}\n\ \ \ \ return\ 0\n\}\n\nproc\ ::InstallJammer::GetDesktopEnvironment\ \{\}\ \{\n\ \ \ \ global\ env\n\n\ \ \ \ ##\ KDE\n\ \ \ \ if\ \{\[info\ exists\ env(DESKTOP)\]\ &&\ \$env(DESKTOP)\ eq\ \"kde\"\}\ \{\ return\ KDE\ \}\n\ \ \ \ if\ \{\[info\ exists\ env(KDE_FULL_SESSION)\]\}\ \{\ return\ KDE\ \}\n\n\ \ \ \ ##\ Gnome\n\ \ \ \ if\ \{\[info\ exists\ env(GNOME_DESKTOP_SESSION_ID)\]\}\ \{\ return\ Gnome\ \}\n\n\ \ \ \ if\ \{\[info\ exists\ env(DESKTOP_SESSION)\]\}\ \{\n\ \ \ \ \ \ \ \ switch\ -glob\ --\ \$env(DESKTOP_SESSION)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \"*KDE*\"\ \ \ \{\ return\ KDE\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \"*GNOME*\"\ \{\ return\ Gnome\ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \"Unknown\"\n\}\n\nproc\ ::InstallJammer::GetLinuxDistribution\ \{\}\ \{\n\ \ \ \ set\ lsb_release\ \[which\ lsb_release\]\n\ \ \ \ if\ \{\[file\ executable\ \$lsb_release\]\}\ \{\n\ \ \ \ \ \ \ \ if\ \{!\[catch\ \{\ exec\ \$lsb_release\ -i\ -s\ \}\ distrib\]\}\ \{\ return\ \$distrib\ \}\n\ \ \ \ \}\n\n\ \ \ \ foreach\ lsb_release\ \[list\ /etc/lsb-release\ /etc/lsb_release\]\ \{\n\tif\ \{\[file\ readable\ \$lsb_release\]\}\ \{\n\n\t\}\n\ \ \ \ \}\n\n\ \ \ \ set\ check\ \{\n\t/etc/mandrake-release\ \ \ \ Mandrake\n\t/etc/fedora-release\ \ \ \ \ \ Fedora\n\t/etc/SuSE-release\ \ \ \ \ \ \ \ SuSE\n\t/etc/debian_version\ \ \ \ \ \ Debian\n\t/etc/gentoo-release\ \ \ \ \ \ Gentoo\n\t/etc/slackware-version\ \ \ Slackware\n\t/etc/turbolinux-release\ \ TurboLinux\n\t/etc/yellowdog-release\ \ \ YellowDog\n\t/etc/connectiva-release\ \ Connectiva\n\t/etc/redhat-release\ \ \ \ \ \ Redhat\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::GetFreeDiskSpace\ \{\ dir\ \}\ \{\n\ \ \ \ global\ conf\n\n\ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ return\ \[::Windows::drive\ freespace\ \[lindex\ \[file\ split\ \$dir\]\ 0\]\]\n\ \ \ \ \}\n\n\ \ \ \ set\ df\ \[which\ df\]\n\ \ \ \ if\ \{\[file\ exists\ \$df\]\}\ \{\n\ \ \ \ \ \ \ \ catch\ \{\ exec\ \$df\ -k\ \$dir\ \}\ output\n\n\ \ \ \ \ \ \ \ set\ line\ \[join\ \[lrange\ \[split\ \$output\ \\n\]\ 1\ end\]\ \"\ \"\]\n\ \ \ \ \ \ \ \ if\ \{!\[catch\ \{\ expr\ \{\[lindex\ \$line\ 3\]\ *\ 1024.0\}\ \}\ avail\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$avail\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ -1\n\}\n\nproc\ ::InstallJammer::FormatDiskSpace\ \{\ space\ \}\ \{\n\ \ \ \ if\ \{\$space\ <\ 1048576\}\ \{\n\ \ \ \ \ \ \ \ return\ \[format\ \"%2.2f\ KB\"\ \[expr\ \{\$space\ /\ 1024.0\}\]\]\n\ \ \ \ \}\n\ \ \ \ if\ \{\$space\ <\ 1073741824\}\ \{\n\ \ \ \ \ \ \ \ return\ \[format\ \"%2.2f\ MB\"\ \[expr\ \{\$space\ /\ 1048576.0\}\]\]\n\ \ \ \ \}\n\ \ \ \ return\ \[format\ \"%2.2f\ GB\"\ \[expr\ \{\$space\ /\ 1073741824.0\}\]\]\n\}\n\nproc\ ::InstallJammer::unpack\ \{\ src\ dest\ \{permissions\ \"\"\}\ \}\ \{\n\ \ \ \ if\ \{!\[string\ length\ \$permissions\]\}\ \{\ set\ permissions\ \"0666\"\ \}\n\n\ \ \ \ #\ Extract\ the\ file\ and\ copy\ it\ to\ its\ location.\n\ \ \ \ set\ fin\ \[open\ \$src\ r\]\n\ \ \ \ if\ \{\[catch\ \{open\ \$dest\ w\ \$permissions\}\ fout\]\}\ \{\n\tclose\ \$fin\n\treturn\ -code\ error\ \$fout\n\ \ \ \ \}\n\n\ \ \ \ fconfigure\ \$fin\ \ -translation\ binary\n\ \ \ \ fconfigure\ \$fout\ -translation\ binary\n\n\ \ \ \ fcopy\ \$fin\ \$fout\n\n\ \ \ \ close\ \$fin\n\ \ \ \ close\ \$fout\n\}\n\nproc\ ::InstallJammer::GetFilesForPattern\ \{\ patternString\ args\ \}\ \{\n\ \ \ \ set\ relative\ \ \ 1\n\ \ \ \ set\ recursive\ \ 0\n\ \ \ \ set\ files\ \ \ \ \ \ \[list\]\n\ \ \ \ set\ patterns\ \ \ \[list\]\n\ \ \ \ set\ installdir\ \[::InstallJammer::SubstText\ <%InstallDir%>\]\n\n\ \ \ \ array\ set\ _args\ \$args\n\ \ \ \ if\ \{\[info\ exists\ _args(-recursive)\]\}\ \{\n\ \ \ \ \ \ \ \ set\ recursive\ 1\n\ \ \ \ \ \ \ \ unset\ _args(-recursive)\n\ \ \ \ \}\n\ \ \ \ set\ args\ \[array\ get\ _args\]\n\n\ \ \ \ foreach\ pattern\ \[split\ \$patternString\ \\\;\]\ \{\n\ \ \ \ \ \ \ \ set\ pattern\ \[string\ trim\ \[::InstallJammer::SubstText\ \$pattern\]\]\n\ \ \ \ \ \ \ \ if\ \{\[file\ pathtype\ \$pattern\]\ ne\ \"relative\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ relative\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ set\ pattern\ \[::InstallJammer::Normalize\ \$pattern\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ lappend\ patterns\ \$pattern\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\[llength\ \$patterns\]\}\ \{\ return\ \}\n\n\ \ \ \ if\ \{\$relative\}\ \{\n\ \ \ \ \ \ \ \ ##\ All\ of\ our\ patterns\ are\ relative,\ so\ we\ can\ do\ a\ single,\ quick\n\ \ \ \ \ \ \ \ ##\ glob\ to\ find\ everything\ relative\ to\ the\ <%InstallDir%>.\n\ \ \ \ \ \ \ \ set\ opts\ \$args\n\ \ \ \ \ \ \ \ lappend\ opts\ -dir\ \$installdir\n\n\ \ \ \ \ \ \ \ set\ files\ \[eval\ glob\ -nocomplain\ \$opts\ \$patterns\]\n\ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ foreach\ pattern\ \$patterns\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ opts\ \$args\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[file\ pathtype\ \$pattern\]\ eq\ \"relative\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ opts\ -dir\ \$installdir\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ eval\ lappend\ files\ \[eval\ glob\ -nocomplain\ \$opts\ \[list\ \$pattern\]\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ return\ \$files\n\}\n\npackage\ require\ Itcl\n\n::itcl::class\ Object\ \{\n\ \ \ \ constructor\ \{args\}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \ \ \ \ set\ ::InstallJammer::ObjMap(\[namespace\ tail\ \$this\])\ \[incr\ objc\]\n\ \ \ \ \}\n\n\ \ \ \ destructor\ \{\n\ \ \ \ \ \ \ \ unset\ ::InstallJammer::ObjMap(\[namespace\ tail\ \$this\])\n\ \ \ \ \}\n\n\ \ \ \ method\ destroy\ \{\}\ \{\n\ \ \ \ \ \ \ \ ::itcl::delete\ object\ \$this\n\ \ \ \ \}\n\n\ \ \ \ method\ cfgvar\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[llength\ \$args\]\ ==\ 2\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ configure\ -\[lindex\ \$args\ 0\]\ \[lindex\ \$args\ 1\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \[cget\ -\[lindex\ \$args\ 0\]\]\n\ \ \ \ \}\n\n\ \ \ \ method\ serialize\ \{\}\ \{\n\ \ \ \ \ \ \ \ set\ return\ \[list\]\n\ \ \ \ \ \ \ \ foreach\ list\ \[configure\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ opt\ \[lindex\ \$list\ 0\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ def\ \[lindex\ \$list\ end-1\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ val\ \[lindex\ \$list\ end\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$def\ ==\ \$val\}\ \{\ continue\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ return\ \$opt\ \$val\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$return\n\ \ \ \ \}\n\n\ \ \ \ common\ objc\ 0\n\}\ \;\ ##\ ::itcl::class\ Object\n\n::itcl::class\ TreeObject\ \{\n\ \ \ \ inherit\ Object\n\n\ \ \ \ constructor\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ set\ id\ \[namespace\ tail\ \$this\]\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \ \ \ \ if\ \{!\$temp\ &&\ \[string\ length\ \$parent\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$parent\ children\ insert\ \$index\ \$id\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ destructor\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\ \$parent\ children\ remove\ \$id\ \}\n\n\ \ \ \ \ \ \ \ foreach\ child\ \$children\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$child\ destroy\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ CleanupAlias\n\ \ \ \ \}\n\n\ \ \ \ method\ serialize\ \{\}\ \{\n\ \ \ \ \ \ \ \ set\ return\ \[list\]\n\ \ \ \ \ \ \ \ foreach\ list\ \[configure\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ opt\ \[lindex\ \$list\ 0\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$opt\ eq\ \"-id\"\ ||\ \$opt\ eq\ \"-index\"\}\ \{\ continue\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ set\ def\ \[lindex\ \$list\ end-1\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ val\ \[lindex\ \$list\ end\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$opt\ eq\ \"-name\"\ &&\ \$val\ eq\ \[string\ tolower\ \$id\]\}\ \{\ continue\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$def\ ==\ \$val\}\ \{\ continue\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ return\ \$opt\ \$val\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$return\n\ \ \ \ \}\n\n\ \ \ \ method\ CleanupAlias\ \{\}\ \{\n\ \ \ \ \ \ \ \ variable\ ::InstallJammer::aliases\n\ \ \ \ \ \ \ \ variable\ ::InstallJammer::aliasmap\n\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ aliasmap(\$id)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ unset\ -nocomplain\ aliases(\$aliasmap(\$id))\n\ \ \ \ \ \ \ \ \ \ \ \ unset\ aliasmap(\$id)\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ protected\ method\ recursive\ \{\ idlist\ \}\ \{\n\ \ \ \ \ \ \ \ set\ list\ \[list\]\n\ \ \ \ \ \ \ \ for\ \{set\ i\ 0\}\ \{\$i\ <\ \[llength\ \$idlist\]\}\ \{incr\ i\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ item\ \[lindex\ \$idlist\ \$i\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[string\ length\ \$item\]\}\ \{\ break\ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ list\ \$item\n\ \ \ \ \ \ \ \ \ \ \ \ set\ childids\ \[\$item\ children\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[llength\ \$childids\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ x\ \[expr\ \{\$i\ +\ 1\}\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ idlist\ \[eval\ linsert\ \[list\ \$idlist\]\ \$x\ \$childids\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ return\ \$list\n\ \ \ \ \}\n\n\ \ \ \ method\ parent\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[lempty\ \$args\]\}\ \{\ return\ \$parent\ \}\n\n\ \ \ \ \ \ \ \ if\ \{!\[string\ equal\ \$args\ \"recursive\"\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[set\ parent\ \[lindex\ \$args\ 0\]\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ set\ x\ \ \ \ \$parent\n\ \ \ \ \ \ \ \ set\ list\ \[list\]\n\ \ \ \ \ \ \ \ while\ \{\[string\ length\ \$x\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ list\ \[linsert\ \$list\ 0\ \$x\]\n\ \ \ \ \ \ \ \ \ \ \ \ set\ x\ \[\$x\ parent\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$list\n\ \ \ \ \}\n\n\ \ \ \ method\ reparent\ \{\ newParent\ \}\ \{\n\ \ \ \ \ \ \ \ ##\ If\ this\ is\ already\ our\ parent,\ don't\ do\ anything.\n\ \ \ \ \ \ \ \ if\ \{\[string\ equal\ \$parent\ \$newParent\]\}\ \{\ return\ \}\n\n\ \ \ \ \ \ \ \ ##\ If\ we\ have\ an\ old\ parent,\ remove\ us\ from\ their\ children.\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\ \$parent\ children\ remove\ \$id\ \}\n\n\ \ \ \ \ \ \ \ ##\ Add\ ourselves\ to\ the\ new\ parent.\n\ \ \ \ \ \ \ \ set\ parent\ \$newParent\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\ \$parent\ children\ add\ \$id\ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ children\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[lempty\ \$args\]\}\ \{\ return\ \$children\ \}\n\n\ \ \ \ \ \ \ \ lassign\ \$args\ command\ obj\n\ \ \ \ \ \ \ \ switch\ --\ \$command\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \"add\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ children\ insert\ end\ \$obj\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"index\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ \[lsearch\ -exact\ \$children\ \$obj\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"insert\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lassign\ \$args\ command\ index\ obj\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$index\ eq\ \"end\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ children\ \$obj\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ children\ \[linsert\ \$children\ \$index\ \$obj\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"remove\"\ -\ \"delete\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ children\ \[lremove\ \$children\ \$obj\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"reorder\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[llength\ \$obj\]\}\ \{\ set\ children\ \$obj\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"recursive\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ \[recursive\ \$children\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ is\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[llength\ \$args\]\ ==\ 1\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[string\ equal\ \$type\ \[lindex\ \$args\ 0\]\]\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[expr\ \{\[lsearch\ -exact\ \$args\ \$type\]\ >\ -1\}\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ index\ \{\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\ return\ \[\$parent\ children\ index\ \$id\]\ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ id\ \ \ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ id\ \ \ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ name\ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ name\ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ type\ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ type\ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ alias\ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ alias\ \ \ \ \ \$args\ \}\n\ \ \ \ method\ active\ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ active\ \ \ \ \$args\ \}\n\ \ \ \ method\ comment\ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ comment\ \ \ \$args\ \}\n\ \ \ \ method\ platforms\ \{\ args\ \}\ \{\ eval\ cfgvar\ platforms\ \$args\ \}\n\n\ \ \ \ public\ variable\ id\ \ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ temp\ \ \ \ 0\n\ \ \ \ public\ variable\ name\ \ \ \ \"\"\n\ \ \ \ public\ variable\ type\ \ \ \ \"\"\n\ \ \ \ public\ variable\ index\ \ \ \"end\"\n\ \ \ \ public\ variable\ active\ \ 1\n\ \ \ \ public\ variable\ parent\ \ \"\"\n\ \ \ \ public\ variable\ comment\ \"\"\n\n\ \ \ \ public\ variable\ platforms\ \[list\]\n\n\ \ \ \ protected\ variable\ children\ \[list\]\n\n\ \ \ \ private\ variable\ oldalias\ \"\"\n\ \ \ \ public\ \ variable\ alias\ \ \ \ \"\"\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$oldalias\]\}\ \{\ CleanupAlias\ \}\n\ \ \ \ \ \ \ \ set\ oldalias\ \$alias\n\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$alias\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ set\ ::InstallJammer::aliases(\$alias)\ \$id\n\ \ \ \ \ \ \ \ \ \ \ \ set\ ::InstallJammer::aliasmap(\$id)\ \$alias\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\}\n\n::itcl::class\ InstallType\ \{\n\ \ \ \ inherit\ TreeObject\n\n\ \ \ \ constructor\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \}\ \{\n\ \ \ \ \ \ \ \ set\ type\ installtype\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \}\n\n\ \ \ \ method\ widget\ \{\ args\ \}\ \{\}\n\ \ \ \ method\ setup\ \ \{\ args\ \}\ \{\ eval\ cfgvar\ setup\ \ \ \ \ \ \ \$args\ \}\n\n\ \ \ \ public\ variable\ setup\ \ \"\"\n\}\n\nitcl::class\ File\ \{\n\ \ \ \ inherit\ TreeObject\n\n\ \ \ \ constructor\ \{args\}\ \{\n\teval\ configure\ \$args\n\ \ \ \ \}\ \{\n\ \ \ \ \ \ \ \ ::set\ type\ file\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \}\n\n\ \ \ \ method\ srcfile\ \{\}\ \{\n\treturn\ \[file\ join\ \$::conf(vfs)\ \$id\]\n\ \ \ \ \}\n\n\ \ \ \ method\ destfile\ \{\}\ \{\n\t::set\ dir\ \[::InstallJammer::SubstText\ \$directory\]\n\treturn\ \[file\ join\ \$dir\ \[file\ tail\ \$name\]\]\n\ \ \ \ \}\n\n\ \ \ \ method\ createdir\ \{\}\ \{\n\t::InstallJammer::CreateDir\ \[::InstallJammer::SubstText\ \$directory\]\n\ \ \ \ \}\n\n\ \ \ \ method\ install\ \{\}\ \{\n\tglobal\ conf\n\n\tif\ \{!\[::InstallJammer::PauseCheck\]\}\ \{\ return\ 0\ \}\n\n\ \ \ \ \ \ \ \ ::set\ dest\ \[install\$type\]\n\n\ \ \ \ \ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetPermissions\ \$dest\ \$attributes\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$type\ eq\ \"dir\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[string\ length\ \$permissions\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ global\ info\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ permissions\ \$info(DefaultDirectoryPermission)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetPermissions\ \$dest\ \$permissions\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ return\ 1\n\ \ \ \ \}\n\n\ \ \ \ method\ installdir\ \{\}\ \{\n\ \ \ \ \ \ \ \ createdir\n\ \ \ \ \}\n\n\ \ \ \ method\ installfile\ \{\ \{dest\ \"\"\}\ \{checkFileMethod\ 1\}\ \{logFile\ 1\}\ \}\ \{\n\tglobal\ conf\n\tglobal\ info\n\tglobal\ versions\n\n\tcreatedir\n\n\t::set\ doInstall\ 1\n\t::set\ src\ \[srcfile\]\n\ \ \ \ \ \ \ \ if\ \{!\[string\ length\ \$dest\]\}\ \{\ ::set\ dest\ \[destfile\]\ \}\n\n\ \ \ \ \ \ \ \ if\ \{!\[string\ length\ \$version\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ version\ \$::info(InstallVersion)\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ version\ \[::InstallJammer::SubstText\ \$version\]\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{\$checkFileMethod\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[string\ length\ \$filemethod\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ filemethod\ \[\$parent\ filemethod\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ switch\ --\ \$filemethod\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"Never\ overwrite\ files\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ We\ don't\ want\ to\ overwrite.\ \ If\ the\ file\ exists,\ skip\ it.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ exists\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ exists\ \[file\ exists\ \$dest\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$exists\}\ \{\ ::set\ doInstall\ 0\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"Update\ files\ with\ more\ recent\ dates\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ We\ only\ want\ to\ overwrite\ if\ the\ file\ we\ have\ is\ newer\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ than\ the\ one\ already\ installed.\ \ If\ the\ one\ we\ have\ is\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ older,\ skip\ it.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ exists\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ exists\ \[file\ exists\ \$dest\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$exists\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[file\ mtime\ \$dest\]\ >=\ \$mtime\}\ \{\ ::set\ doInstall\ 0\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"Update\ files\ with\ a\ newer\ version\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ global\ info\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ We\ want\ to\ overwrite\ the\ file\ if\ we\ have\ a\ newer\ version\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ than\ the\ one\ stored.\ \ If\ there\ isn't\ one\ stored,\ we'll\ go\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ ahead\ and\ store\ ours.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ exists\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ exists\ \[file\ exists\ \$dest\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$exists\ &&\ \[info\ exists\ versions(\$dest)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ c\ \[package\ vcompare\ \$version\ \$versions(\$dest)\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$c\ ==\ 0\ ||\ \$c\ ==\ -1\}\ \{\ ::set\ doInstall\ 0\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"Always\ overwrite\ files\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ We\ want\ to\ always\ overwrite\ the\ file.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ##\ This\ is\ the\ default\ action,\ so\ we\ do\ nothing.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\t::set\ info(FileSize)\ \$size\n\tif\ \{!\$doInstall\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ progress\ ::InstallJammer::IncrProgress\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[::InstallJammer::CommandExists\ \$progress\]\}\ \{\ \$progress\ \$size\ \}\n\t\ \ \ \ return\ \$dest\n\t\}\n\n\ \ \ \ \ \ \ \ if\ \{!\[string\ length\ \$permissions\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ permissions\ 0666\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ permissions\ \$info(DefaultFilePermission)\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\tif\ \{!\$size\}\ \{\n\t\ \ \ \ if\ \{\[catch\ \{\ open\ \$dest\ w\ \$permissions\ \}\ err\]\}\ \{\n\t\treturn\ -code\ error\ \$err\n\t\ \ \ \ \}\n\t\ \ \ \ close\ \$err\n\t\}\ else\ \{\n\t\ \ \ \ ::InstallJammer::unpack\ \$src\ \$dest\ \$permissions\n\t\}\n\n\ \ \ \ \ \ \ \ ##\ Set\ the\ modified\ time\ to\ the\ one\ we\ have\ stored.\n\ \ \ \ \ \ \ \ if\ \{\$mtime\}\ \{\ file\ mtime\ \$dest\ \$mtime\ \}\n\n\ \ \ \ \ \ \ \ if\ \{\$logFile\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::LogFile\ \$dest\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetVersionInfo\ \$dest\ \$version\n\ \ \ \ \ \ \ \ \}\n\n\treturn\ \$dest\n\ \ \ \ \}\n\n\ \ \ \ method\ group\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \[lindex\ \[parent\ recursive\]\ 1\]\n\ \ \ \ \}\n\n\ \ \ \ method\ set\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ return\ \[eval\ ::InstallJammer::SetObjectProperties\ \$id\ \$args\]\n\ \ \ \ \}\n\n\ \ \ \ method\ get\ \{\ property\ \{varName\ \"\"\}\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$varName\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ upvar\ 1\ \$varName\ var\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[::InstallJammer::GetObjectProperty\ \$id\ \$property\ var\]\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[::InstallJammer::GetObjectProperty\ \$id\ \$property\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ isfile\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \[is\ file\ link\]\n\ \ \ \ \}\n\n\ \ \ \ method\ object\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ ::FileObject\n\ \ \ \ \}\n\n\ \ \ \ method\ name\ \ \ \ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ name\ \ \ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ size\ \ \ \ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ size\ \ \ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ mtime\ \ \ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ mtime\ \ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ version\ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ version\ \ \ \ \ \$args\ \}\n\ \ \ \ method\ directory\ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ directory\ \ \ \$args\ \}\n\ \ \ \ method\ filemethod\ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ filemethod\ \ \$args\ \}\n\ \ \ \ method\ attributes\ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ attributes\ \ \$args\ \}\n\ \ \ \ method\ permissions\ \ \{\ args\ \}\ \{\ eval\ cfgvar\ permissions\ \$args\ \}\n\n\ \ \ \ public\ variable\ name\ \ \ \ \ \ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ size\ \ \ \ \ \ \ \ \ \ 0\n\ \ \ \ public\ variable\ mtime\ \ \ \ \ \ \ \ \ 0\n\ \ \ \ public\ variable\ version\ \ \ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ directory\ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ filemethod\ \ \ \ \"\"\n\ \ \ \ public\ variable\ attributes\ \ \ \ \"\"\n\ \ \ \ public\ variable\ permissions\ \ \ \"\"\n\n\ \ \ \ private\ variable\ exists\n\n\}\ \;\ ##\ itcl::class\ File\n\n::itcl::class\ InstallComponent\ \{\n\ \ \ \ inherit\ TreeObject\n\n\ \ \ \ constructor\ \{\ args\ \}\ \{\ \n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \}\ \{\n\ \ \ \ \ \ \ \ ::set\ name\ \[string\ tolower\ \$id\]\n\ \ \ \ \ \ \ \ ::set\ type\ installcomponent\n\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\n\ \ \ \ \ \ \ \ ##\ If\ this\ is\ a\ temporary\ object,\ we\ don't\ want\ to\ append\n\ \ \ \ \ \ \ \ ##\ it\ to\ the\ lists\ or\ do\ any\ further\ setup.\n\ \ \ \ \ \ \ \ if\ \{\$temp\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\ \$parent\ children\ remove\ \$id\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ return\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{\[info\ exists\ ::InstallJammer::Properties(\$id,Alias)\]\n\ \ \ \ \ \ \ \ \ \ \ \ &&\ \[string\ length\ \$::InstallJammer::Properties(\$id,Alias)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$this\ set\ Alias\ \$::InstallJammer::Properties(\$id,Alias)\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ ##\ Do\ some\ special\ setup\ if\ this\ is\ a\ pane,\ and\ we're\n\ \ \ \ \ \ \ \ ##\ building\ it\ from\ within\ an\ installer.\n\ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ ::InstallJammer\]\ &&\ \[ispane\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ install\ \$parent\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ wizard\ \ \$::info(Wizard)\n\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ node\ \$parent\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[\$parent\ is\ installtype\]\}\ \{\ ::set\ node\ root\ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ equal\ \$install\ \"Common\"\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::CreateWindow\ \$wizard\ \$id\n\ \ \ \ \ \ \ \ \ \ \ \ \}\ elseif\ \{\[string\ equal\ \$install\ \$::info(InstallMode)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ create\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \[list\ ::InstallJammer::CreateWindow\ \$wizard\ \$id\]\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ get\ WizardOptions\ stepopts\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ eval\ \[list\ \$wizard\ insert\ step\ end\ \$node\ \$id\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -createcommand\ \$create\]\ \$stepopts\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[is\ window\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$wizard\ itemconfigure\ \$id\ -appendorder\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ destructor\ \{\n\ \ \ \ \ \ \ \ if\ \{!\$temp\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ array\ unset\ ::InstallJammer::Properties\ \$id,*\n\n\ \ \ \ \ \ \ \ \ \ \ \ foreach\ condition\ \$conditions\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ catch\ \{\ \$condition\ destroy\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ set\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ return\ \[eval\ ::InstallJammer::SetObjectProperties\ \$id\ \$args\]\n\ \ \ \ \}\n\n\ \ \ \ method\ get\ \{\ property\ \{varName\ \"\"\}\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$varName\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ upvar\ 1\ \$varName\ var\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[::InstallJammer::GetObjectProperty\ \$id\ \$property\ var\]\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[::InstallJammer::GetObjectProperty\ \$id\ \$property\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ properties\ \{\ arrayName\ args\ \}\ \{\n\ \ \ \ \ \ \ \ upvar\ 1\ \$arrayName\ array\n\ \ \ \ \ \ \ \ return\ \[eval\ ::InstallJammer::ObjectProperties\ \$id\ array\ \$args\]\n\ \ \ \ \}\n\n\ \ \ \ method\ ispane\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \[expr\ \{\[is\ \"pane\"\]\ ||\ \[is\ \"window\"\]\}\]\n\ \ \ \ \}\n\n\ \ \ \ method\ object\ \{\}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[ispane\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ variable\ ::InstallJammer::panes\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$panes(\$component)\n\ \ \ \ \ \ \ \ \}\ elseif\ \{\[is\ action\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ variable\ ::InstallJammer::actions\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \$actions(\$component)\n\ \ \ \ \ \ \ \ \}\ elseif\ \{\[is\ actiongroup\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ ActionGroupObject\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ initialize\ \{\}\ \{\n\ \ \ \ \ \ \ \ \[object\]\ initialize\ \$id\n\ \ \ \ \}\n\n\ \ \ \ method\ widget\ \{\ command\ widget\ args\ \}\ \{\n\ \ \ \ \ \ \ \ switch\ --\ \$command\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \"get\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[info\ exists\ widgetData(\$widget,widget)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ \$widgetData(\$widget,widget)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"set\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[lsearch\ -exact\ \$widgets\ \$widget\]\ <\ 0\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ widgets\ \$widget\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ \[list\ opt\ val\]\ \$args\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ widgetData(\$widget,\[string\ range\ \$opt\ 1\ end\])\ \$val\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \n\ \ \ \ \ \ \ \ \ \ \ \ \"type\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[info\ exists\ widgetData(\$widget,type)\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ \$widgetData(\$widget,type)\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ text\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ widgets\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \$widgets\n\ \ \ \ \}\n\n\ \ \ \ method\ conditions\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[lempty\ \$args\]\}\ \{\ return\ \$conditions\ \}\n\n\ \ \ \ \ \ \ \ lassign\ \$args\ command\ obj\n\ \ \ \ \ \ \ \ switch\ --\ \$command\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \"add\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ conditions\ insert\ end\ \$obj\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"index\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ \[lsearch\ -exact\ \$conditions\ \$obj\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"insert\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lassign\ \$args\ command\ index\ obj\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[lsearch\ -exact\ \$conditions\ \$obj\]\ >\ -1\}\ \{\ return\ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$index\ eq\ \"end\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ conditions\ \$obj\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ conditions\ \[linsert\ \$conditions\ \$index\ \$obj\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"remove\"\ -\ \"delete\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ conditions\ \[lremove\ \$conditions\ \$obj\]\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \"reorder\"\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ conditions\ \$obj\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ return\n\ \ \ \ \}\n\n\ \ \ \ method\ checkConditions\ \{\ \{when\ \"\"\}\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[ispane\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ global\ info\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ info(CurrentPane)\ \$id\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ if\ \{\[llength\ \$conditions\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ conditionlist\ \$conditions\n\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$when\ ne\ \"\"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ conditionlist\ \[list\]\n\ \ \ \ \ \ \ \ \ \ \ \ foreach\ cid\ \$conditions\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$when\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ check\ \[\$cid\ get\ CheckCondition\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ equal\ -nocase\ \$when\ \$check\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ lappend\ conditionlist\ \$cid\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[llength\ \$conditionlist\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::set\ msg\ \"Checking\ conditions\ for\ \$id\ -\ \$title\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$when\ ne\ \"\"\}\ \{\ append\ msg\ \"\ -\ \$when\"\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ debug\ \$msg\ \$id\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ foreach\ cid\ \$conditionlist\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ debug\ \"Checking\ condition\ \$cid\ -\ \[\$cid\ title\]\"\ \$cid\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[\$cid\ check\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ debug\ \"Condition\ failed\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ return\ 0\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ debug\ \"Condition\ passed\"\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ return\ 1\n\ \ \ \ \}\n\n\ \ \ \ method\ setup\ \ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ setup\ \ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ title\ \ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ title\ \ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ window\ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ window\ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ created\ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ created\ \ \ \ \ \$args\ \}\n\ \ \ \ method\ command\ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ command\ \ \ \ \ \$args\ \}\n\ \ \ \ method\ component\ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ component\ \ \ \$args\ \}\n\ \ \ \ method\ arguments\ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ arguments\ \ \ \$args\ \}\n\ \ \ \ method\ description\ \{\ args\ \}\ \{\ eval\ cfgvar\ description\ \$args\ \}\n\n\ \ \ \ public\ variable\ setup\ \ \ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ title\ \ \ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ window\ \ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ created\ \ \ \ \ 0\n\ \ \ \ \n\ \ \ \ public\ variable\ command\ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ component\ \ \ \"\"\n\ \ \ \ public\ variable\ arguments\ \ \ \"\"\n\ \ \ \ public\ variable\ conditions\ \ \[list\]\n\ \ \ \ public\ variable\ description\ \"\"\n\n\ \ \ \ private\ variable\ widgets\ \ \ \ \[list\]\n\ \ \ \ private\ variable\ widgetData\n\}\ \;\ ##\ ::itcl::class\ InstallComponent\n\n::itcl::class\ FileGroup\ \{\n\ \ \ \ inherit\ InstallComponent\n\n\ \ \ \ constructor\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \ \ \ \ ::set\ type\ \ filegroup\n\ \ \ \ \ \ \ \ ::set\ setup\ Install\n\ \ \ \ \}\n\n\ \ \ \ method\ install\ \{\}\ \{\n\ \ \ \ \ \ \ \ global\ conf\n\n\ \ \ \ \ \ \ \ ::set\ dir\ \[directory\]\n\n\ \ \ \ \ \ \ \ ::InstallJammer::CreateDir\ \$dir\n\n\ \ \ \ \ \ \ \ if\ \{\$conf(windows)\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetPermissions\ \$dir\ \[get\ Attributes\]\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::SetPermissions\ \$dir\ \[get\ Permissions\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ directory\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \[::InstallJammer::SubstText\ \[get\ Destination\]\]\n\ \ \ \ \}\n\n\ \ \ \ method\ version\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \[get\ Version\]\n\ \ \ \ \}\n\n\ \ \ \ method\ filemethod\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \[get\ FileUpdateMethod\]\n\ \ \ \ \}\n\n\ \ \ \ method\ object\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ ::FileGroupObject\n\ \ \ \ \}\n\}\ \;\ ##\ ::itcl::class\ FileGroup\n\n::itcl::class\ Component\ \{\n\ \ \ \ inherit\ InstallComponent\n\n\ \ \ \ constructor\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \ \ \ \ ::set\ type\ \ component\n\ \ \ \ \ \ \ \ ::set\ setup\ Install\n\ \ \ \ \}\n\n\ \ \ \ method\ object\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ ::ComponentObject\n\ \ \ \ \}\n\}\ \;\ ##\ ::itcl::class\ Component\n\n::itcl::class\ SetupType\ \{\n\ \ \ \ inherit\ InstallComponent\n\n\ \ \ \ constructor\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \}\ \{\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\ \ \ \ \ \ \ \ ::set\ type\ \ setuptype\n\ \ \ \ \ \ \ \ ::set\ setup\ Install\n\ \ \ \ \}\n\n\ \ \ \ method\ object\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ ::SetupTypeObject\n\ \ \ \ \}\n\}\ \;\ ##\ ::itcl::class\ SetupType\n\n::itcl::class\ Condition\ \{\n\ \ \ \ inherit\ Object\n\n\ \ \ \ constructor\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ ::set\ id\ \[namespace\ tail\ \$this\]\n\ \ \ \ \ \ \ \ eval\ configure\ \$args\n\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$parent\ conditions\ add\ \$id\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ destructor\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$parent\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \$parent\ conditions\ remove\ \$id\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ serialize\ \{\}\ \{\n\ \ \ \ \ \ \ \ ::set\ return\ \[list\]\n\ \ \ \ \ \ \ \ foreach\ list\ \[configure\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ opt\ \[lindex\ \$list\ 0\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$opt\ eq\ \"-id\"\}\ \{\ continue\ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ def\ \[lindex\ \$list\ end-1\]\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ val\ \[lindex\ \$list\ end\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\$def\ ==\ \$val\}\ \{\ continue\ \}\n\ \ \ \ \ \ \ \ \ \ \ \ lappend\ return\ \$opt\ \$val\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$return\n\ \ \ \ \}\n\n\ \ \ \ method\ set\ \{\ args\ \}\ \{\n\ \ \ \ \ \ \ \ return\ \[eval\ ::InstallJammer::SetObjectProperties\ \$id\ \$args\]\n\ \ \ \ \}\n\n\ \ \ \ method\ get\ \{\ property\ \{varName\ \"\"\}\ \}\ \{\n\ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$varName\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ upvar\ 1\ \$varName\ var\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[::InstallJammer::GetObjectProperty\ \$id\ \$property\ var\]\n\ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ return\ \[::InstallJammer::GetObjectProperty\ \$id\ \$property\]\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\n\ \ \ \ method\ properties\ \{\ arrayName\ args\ \}\ \{\n\ \ \ \ \ \ \ \ upvar\ 1\ \$arrayName\ array\n\ \ \ \ \ \ \ \ return\ \[eval\ ::InstallJammer::ObjectProperties\ \$id\ array\ \$args\]\n\ \ \ \ \}\n\n\ \ \ \ method\ object\ \{\}\ \{\n\ \ \ \ \ \ \ \ return\ \$::InstallJammer::conditions(\$component)\n\ \ \ \ \}\n\n\ \ \ \ method\ check\ \{\}\ \{\n\ \ \ \ \ \ \ \ ::set\ res\ \[string\ is\ true\ \[::InstallJammer::conditions::\$component\ \$id\]\]\n\ \ \ \ \ \ \ \ if\ \{!\$res\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ ::set\ msg\ \[::InstallJammer::SubstText\ \[get\ FailureMessage\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ length\ \$msg\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ::InstallJammer::MessageBox\ -icon\ error\ -message\ \$msg\n\ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ return\ \$res\n\ \ \ \ \}\n\n\ \ \ \ method\ id\ \ \ \ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ id\ \ \ \ \ \ \ \ \$args\ \}\n\ \ \ \ method\ title\ \ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ title\ \ \ \ \ \$args\ \}\n\ \ \ \ method\ active\ \ \ \ \{\ args\ \}\ \{\ eval\ cfgvar\ active\ \ \ \ \$args\ \}\n\ \ \ \ method\ component\ \{\ args\ \}\ \{\ eval\ cfgvar\ component\ \$args\ \}\n\n\ \ \ \ public\ variable\ id\ \ \ \ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ title\ \ \ \ \ \"\"\n\ \ \ \ public\ variable\ active\ \ \ \ 1\n\ \ \ \ public\ variable\ parent\ \ \ \ \"\"\n\ \ \ \ public\ variable\ component\ \"\"\n\}\ \;\ ##\ ::itcl::class\ Condition\n\n##\ \$Id\$\n##\n##\ Copyright\ (C)\ 2002\ \ Damon\ Courtney\n##\ \n##\ This\ program\ is\ free\ software\;\ you\ can\ redistribute\ it\ and/or\n##\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\n##\ as\ published\ by\ the\ Free\ Software\ Foundation\;\ either\ version\ 2\n##\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\n##\ \n##\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\n##\ but\ WITHOUT\ ANY\ WARRANTY\;\ without\ even\ the\ implied\ warranty\ of\n##\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\n##\ GNU\ General\ Public\ License\ for\ more\ details.\n##\ \n##\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\n##\ along\ with\ this\ program\;\ if\ not,\ write\ to\ the\n##\ \ \ \ \ Free\ Software\ Foundation,\ Inc.\n##\ \ \ \ \ 51\ Franklin\ Street,\ Fifth\ Floor\n##\ \ \ \ \ Boston,\ MA\ \ 02110-1301,\ USA.\n##\n\nnamespace\ eval\ ::installkit\ \{\}\n\n##\ Create\ a\ generic\ InstallKit\ from\ the\ current\ running\ process.\nproc\ ::installkit::base\ \{\ \{installkit\ \"\"\}\ \}\ \{\n\ \ \ \ global\ info\n\ \ \ \ if\ \{!\[string\ length\ \$installkit\]\}\ \{\n\ \ \ \ \ \ \ \ set\ installkit\ \[::InstallJammer::TmpDir\ installkit\$info(Ext)\]\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\[file\ exists\ \$installkit\]\}\ \{\n\ \ \ \ \ \ \ \ set\ installkit\ \[::InstallJammer::Wrap\ -o\ \$installkit\]\n\ \ \ \ \}\n\n\ \ \ \ return\ \[::InstallJammer::Normalize\ \$installkit\]\n\}\n\nproc\ ::installkit::WrapProgress\ \{total\ size\ bytes\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ iincr\ conf(wrapTotal)\ \$bytes.0\n\ \ \ \ iincr\ conf(wrapSoFar)\ \$bytes.0\n\ \ \ \ if\ \{\$total\ >\ 0\}\ \{\n\tset\ x\ \[expr\ round(\ (\$conf(wrapTotal)\ *\ 100.0)\ /\ \$total\ )\]\n\tputs\ stdout\ \":PERCENT\ \$x\"\n\tflush\ stdout\n\ \ \ \ \}\n\ \ \ \ if\ \{\$size\ >\ 0\}\ \{\n\tset\ x\ \[expr\ round(\ (\$conf(wrapSoFar)\ *\ 100.0)\ /\ \$size\ )\]\n\tputs\ stdout\ \":FILEPERCENT\ \$x\"\n\tflush\ stdout\n\ \ \ \ \}\n\}\n\nproc\ ::installkit::WrapUnpack\ \{ifp\ ofp\ total\ size\ bytes\ \{error\ \"\"\}\}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ WrapProgress\ \$total\ \$size\ \$bytes\n\ \ \ \ if\ \{\[string\ length\ \$error\]\ >\ 0\ ||\ \[eof\ \$ifp\]\}\ \{\n\tclose\ \$ifp\n\tclose\ \$ofp\n\tset\ ::conf(wrapDone)\ 1\n\ \ \ \ \}\ else\ \{\n\t::fcopy\ \$ifp\ \$ofp\ -size\ 50000\ \\\n\t\ \ \ \ -command\ \[list\ ::installkit::WrapUnpack\ \$ifp\ \$ofp\ \$total\ \$size\]\n\ \ \ \ \}\n\}\n\nproc\ ::installkit::Mount\ \{\ zipFile\ mountPoint\ \}\ \{\n\ \ \ \ zvfs::mount\ \$zipFile\ \$mountPoint\n\}\n\nproc\ ::installkit::Unmount\ \{\ mountPoint\ \}\ \{\n\ \ \ \ zvfs::unmount\ \$mountPoint\n\} uninstall.tcl {## $Id$
- ##
- ## Copyright (C) 2002 Damon Courtney
- ##
- ## This program is free software; you can redistribute it and/or
- ## modify it under the terms of the GNU General Public License
- ## as published by the Free Software Foundation; either version 2
- ## of the License, or (at your option) any later version.
- ##
- ## This program is distributed in the hope that it will be useful,
- ## but WITHOUT ANY WARRANTY; without even the implied warranty of
- ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ## GNU General Public License for more details.
- ##
- ## You should have received a copy of the GNU General Public License
- ## along with this program; if not, write to the
- ## Free Software Foundation, Inc.
- ## 51 Franklin Street, Fifth Floor
- ## Boston, MA 02110-1301, USA.
- ##
-
- if {[info exists ::InstallJammer]} { return }
-
- catch { wm withdraw . }
-
- namespace eval ::InstallJammer {}
-
- trace add variable ::info write ::InstallJammer::AdjustBooleanVars
-
- proc ::InstallJammer::AdjustBooleanVars { name1 name2 op } {
- ## If a user is typing into an entry that has a -textvariable
- ## in the info array, we don't want to adjust what the user is typing.
- if {![catch { lindex [info level -1] 0 } cmd]} {
- if {$cmd eq "tk::EntryInsert" || $cmd eq "tile::entry::Insert"} {
- return
- }
- }
-
- if {[string length $name2]} {
- upvar #0 ${name1}($name2) var
- } else {
- upvar #0 $name1 var
- }
-
- if {[info exists var]} {
- if {[string is true -strict $var]} {
- set var 1
- } elseif {[string is false -strict $var]} {
- set var 0
- }
- }
- }
-
- set PaneList {Uninstall UninstallComplete UninstallDetails}
- array set ::InstallJammer::Properties {
- 1016F936-2BE9-4ECB-8539-82A68DBBAA74,Active
- Yes
-
- 1016F936-2BE9-4ECB-8539-82A68DBBAA74,Alias
- {Uninstall Actions}
-
- 1016F936-2BE9-4ECB-8539-82A68DBBAA74,Comment
- {}
-
- 1016F936-2BE9-4ECB-8539-82A68DBBAA74,Conditions
- {}
-
- 1016F936-2BE9-4ECB-8539-82A68DBBAA74,ID
- {}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,Action
- {Uninstall Actions}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,Active
- Yes
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,Alias
- {}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,Comment
- {}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,Component
- {}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,Conditions
- {}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,EvaluateConditions
- Yes
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,ExecuteAction
- {After Pane is Displayed}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,ID
- {}
-
- 213B7E89-C364-4995-859C-ABA65D4C3EDE,IgnoreErrors
- No
-
- 22B753EA-DE2A-4B20-A945-224738E90986,Active
- Yes
-
- 22B753EA-DE2A-4B20-A945-224738E90986,Alias
- {Finish Actions}
-
- 22B753EA-DE2A-4B20-A945-224738E90986,Comment
- {}
-
- 22B753EA-DE2A-4B20-A945-224738E90986,Conditions
- {}
-
- 22B753EA-DE2A-4B20-A945-224738E90986,ID
- {}
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,Active
- Yes
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,Alias
- {}
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,Comment
- {}
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,Component
- {}
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,Conditions
- {0 conditions}
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,ExecuteAction
- {After Pane is Displayed}
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,Files
- <%InstallDir%>/Settings.ini
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,ID
- {}
-
- 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D,IgnoreErrors
- Yes
-
- 39A03798-2744-48BB-8077-84B333E50E14,Active
- Yes
-
- 39A03798-2744-48BB-8077-84B333E50E14,Alias
- {}
-
- 39A03798-2744-48BB-8077-84B333E50E14,BackButton,subst
- 1
-
- 39A03798-2744-48BB-8077-84B333E50E14,Buttons
- Next/Cancel
-
- 39A03798-2744-48BB-8077-84B333E50E14,CancelButton,subst
- 1
-
- 39A03798-2744-48BB-8077-84B333E50E14,Caption,subst
- 1
-
- 39A03798-2744-48BB-8077-84B333E50E14,Comment
- {}
-
- 39A03798-2744-48BB-8077-84B333E50E14,Component
- {}
-
- 39A03798-2744-48BB-8077-84B333E50E14,Conditions
- {1 condition}
-
- 39A03798-2744-48BB-8077-84B333E50E14,ID
- {}
-
- 39A03798-2744-48BB-8077-84B333E50E14,Icon
- <%Icon%>
-
- 39A03798-2744-48BB-8077-84B333E50E14,Message,subst
- 1
-
- 39A03798-2744-48BB-8077-84B333E50E14,NextButton,subst
- 1
-
- 39A03798-2744-48BB-8077-84B333E50E14,Subtitle,subst
- 1
-
- 39A03798-2744-48BB-8077-84B333E50E14,Text,subst
- 1
-
- 39A03798-2744-48BB-8077-84B333E50E14,Title,subst
- 1
-
- 47F70A4D-19E3-4751-B84C-E544AB8FD345,Active
- Yes
-
- 47F70A4D-19E3-4751-B84C-E544AB8FD345,Alias
- {Startup Actions}
-
- 47F70A4D-19E3-4751-B84C-E544AB8FD345,Comment
- {}
-
- 47F70A4D-19E3-4751-B84C-E544AB8FD345,Conditions
- {0 conditions}
-
- 47F70A4D-19E3-4751-B84C-E544AB8FD345,ID
- {}
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,Active
- Yes
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,Alias
- {}
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,Comment
- {}
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,Component
- {}
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,Conditions
- {}
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,ExecuteAction
- {After Pane is Displayed}
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,ID
- {}
-
- 579EFC8C-CC0C-4446-84A0-B218E254A6E7,IgnoreErrors
- No
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,Action
- {Uninstall Actions}
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,Active
- Yes
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,Alias
- {}
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,Comment
- {}
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,Component
- {}
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,Conditions
- {}
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,EvaluateConditions
- Yes
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,ExecuteAction
- {After Pane is Displayed}
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,ID
- {}
-
- 616C0583-E61A-4F7C-B865-9089F3B745FA,IgnoreErrors
- No
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,Active
- Yes
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,Alias
- {}
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,CheckCondition
- {Before Pane is Displayed}
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,Comment
- {}
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,Component
- {}
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,FailureMessage
- {}
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,ID
- {}
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,Operator
- true
-
- 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B,String
- <%ErrorsOccurred%>
-
- 9A3D786A-9CE4-4F36-8EAD-C0A12029BF1A,Active
- Yes
-
- 9A3D786A-9CE4-4F36-8EAD-C0A12029BF1A,Alias
- {Cancel Actions}
-
- 9A3D786A-9CE4-4F36-8EAD-C0A12029BF1A,Comment
- {}
-
- 9A3D786A-9CE4-4F36-8EAD-C0A12029BF1A,Conditions
- {}
-
- 9A3D786A-9CE4-4F36-8EAD-C0A12029BF1A,ID
- {}
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,Active
- Yes
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,Alias
- {}
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,CheckCondition
- {Before Pane is Displayed}
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,Comment
- {}
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,Component
- {}
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,FailureMessage
- {}
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,ID
- {}
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,Operator
- true
-
- 9C5D86BD-8E00-4D68-B230-100344377DB1,String
- <%ErrorsOccurred%>
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,Active
- Yes
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,Alias
- {}
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,Comment
- {}
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,Component
- {}
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,Conditions
- {}
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,ExecuteAction
- {After Pane is Displayed}
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,ID
- {}
-
- A2364EBD-0BAE-4C4B-BF65-D486384DFFE2,IgnoreErrors
- No
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,Active
- Yes
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,Alias
- {}
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,CheckCondition
- {Before Pane is Displayed}
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,Comment
- {}
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,Component
- {}
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,DefaultButton
- Yes
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,FailureMessage
- {}
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,ID
- {}
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,Icon
- info
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,Message,subst
- 1
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,ResultVirtualText
- Answer
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,Title,subst
- 1
-
- DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC,TrueValue
- Yes
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,Active
- Yes
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,Alias
- {}
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,Comment
- {}
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,Component
- {}
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,Conditions
- {}
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,ExecuteAction
- {After Pane is Displayed}
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,ID
- {}
-
- E0E9AB16-3718-4359-99DE-7A7B80960AFF,IgnoreErrors
- No
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,Active
- Yes
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,Alias
- {}
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,Comment
- {}
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,Component
- {}
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,Conditions
- {}
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,ExecuteAction
- {After Pane is Displayed}
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,ExitType
- Finish
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,ID
- {}
-
- E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB,IgnoreErrors
- No
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Active
- Yes
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Alias
- {}
-
- E407FB36-48CE-4081-9051-6BAA771E761A,BackButton,subst
- 1
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Buttons
- Next/Cancel
-
- E407FB36-48CE-4081-9051-6BAA771E761A,CancelButton,subst
- 1
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Caption,subst
- 1
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Comment
- {}
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Component
- {}
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Conditions
- {0 conditions}
-
- E407FB36-48CE-4081-9051-6BAA771E761A,ID
- {}
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Image
- <%Image%>
-
- E407FB36-48CE-4081-9051-6BAA771E761A,Message,subst
- 1
-
- E407FB36-48CE-4081-9051-6BAA771E761A,NextButton,subst
- 1
-
- E407FB36-48CE-4081-9051-6BAA771E761A,WizardOptions
- {-bg white -separator 0}
-
- F799E315-34DC-4C43-9820-835EFE017509,Active
- Yes
-
- F799E315-34DC-4C43-9820-835EFE017509,Alias
- {}
-
- F799E315-34DC-4C43-9820-835EFE017509,Comment
- {}
-
- F799E315-34DC-4C43-9820-835EFE017509,Component
- {}
-
- F799E315-34DC-4C43-9820-835EFE017509,Conditions
- {}
-
- F799E315-34DC-4C43-9820-835EFE017509,ExecuteAction
- {After Pane is Displayed}
-
- F799E315-34DC-4C43-9820-835EFE017509,ID
- {}
-
- F799E315-34DC-4C43-9820-835EFE017509,IgnoreErrors
- No
-
- F799E315-34DC-4C43-9820-835EFE017509,State
- disabled
-
- F799E315-34DC-4C43-9820-835EFE017509,Text
- {}
-
- F799E315-34DC-4C43-9820-835EFE017509,Widget
- {NextButton; CancelButton}
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Active
- Yes
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Alias
- {}
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,BackButton,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Buttons
- Next/Cancel
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,CancelButton,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Caption,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Comment
- {}
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Component
- {}
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Conditions
- {0 conditions}
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,FileValue,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,ID
- {}
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Icon
- <%Icon%>
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Message,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,NextButton,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,ProgressValue,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Subtitle,subst
- 1
-
- F8912289-F9F6-4C2E-8058-C38BD7F3E27B,Title,subst
- 1
-
- Linux-x86,Active
- No
-
- Linux-x86,BuildType
- dynamic
-
- Linux-x86,DefaultDirectoryPermission
- 00755
-
- Linux-x86,DefaultFilePermission
- 00755
-
- Linux-x86,Executable
- <%AppName%>-<%Version%>-<%Platform%>-Install<%Ext%>
-
- Linux-x86,InstallDir
- <%Home%>/<%ShortAppName%>
-
- Linux-x86,InstallType
- Typical
-
- Linux-x86,ProgramExecutable
- <%InstallDir%>/CompleteCalc
-
- Linux-x86,ProgramFolderAllUsers
- No
-
- Linux-x86,ProgramFolderName
- <%AppName%>
-
- Linux-x86,ProgramLicense
- <%InstallDir%>/LICENSE.txt
-
- Linux-x86,ProgramName
- {}
-
- Linux-x86,ProgramReadme
- <%InstallDir%>/README.txt
-
- Linux-x86,RequireRoot
- No
-
- Linux-x86,RootInstallDir
- /usr/local/<%ShortAppName%>
-
- Windows,Active
- Yes
-
- Windows,BuildType
- {}
-
- Windows,Executable
- <%AppName%>-<%Version%>-Setup<%Ext%>
-
- Windows,IncludeTWAPI
- No
-
- Windows,InstallDir
- <%PROGRAM_FILES%>/<%AppName%>
-
- Windows,InstallType
- Typical
-
- Windows,ProgramExecutable
- <%InstallDir%>/CompleteCalc.exe
-
- Windows,ProgramFolderAllUsers
- No
-
- Windows,ProgramFolderName
- <%AppName%>
-
- Windows,ProgramLicense
- <%InstallDir%>/LICENSE.txt
-
- Windows,ProgramName
- {}
-
- Windows,ProgramReadme
- <%InstallDir%>/README.txt
-
- Windows,WindowsIcon
- {Setup Blue Screen.ico}
-
- }
- namespace eval ::InstallJammer::actions {}
- proc ::InstallJammer::actions::DeleteFile {obj} {
- $obj properties props
-
- foreach file [::InstallJammer::GetFilesForPattern $props(Files)] {
- file delete -force $file
- }
- }
-
- proc ::InstallJammer::actions::ExecuteAction {obj} {
- set id [$obj id]
-
- if {[$obj get Action action] && [string length $action]} {
- $obj get EvaluateConditions eval
- return [::InstallJammer::ExecuteActions $action -parent $id -conditions $eval]
- }
- }
-
- proc ::InstallJammer::actions::Exit {obj} {
- global info
-
- if {[$obj get ExitType] eq "Cancel"} {
- set info(InstallCancelled) 1
- }
-
- ## Walk through a list of possible exit routines and
- ## choose the best one we have.
- foreach command [list ::Exit ::InstallJammer::exit ::exit] {
- if {[::InstallJammer::CommandExists $command]} {
- $command
- }
- }
- }
-
- proc ::InstallJammer::actions::ModifyWidget {obj} {
- global info
-
- set parent [$obj parent]
-
- $obj properties props
-
- if {![string length $props(Widget)]} { return }
-
- set args [list]
- if {[string length $props(Text)]} { lappend args -text $props(Text) }
- if {[string length $props(State)]} { lappend args -state $props(State) }
-
- if {![llength $args]} { return }
-
- foreach widget [split $props(Widget) \;] {
- set widget [join [string trim $widget] ""]
- switch -- $widget {
- "BackButton" - "NextButton" - "CancelButton" {
- set widget [string tolower [string map {Button ""} $widget]]
- eval [list $info(Wizard) itemconfigure $widget] $args
- }
-
- default {
- set widget [$parent widget get $widget]
- eval [list $widget configure] $args
- }
- }
- }
-
- update idletasks
- }
-
- proc ::InstallJammer::actions::MoveForward {obj} {
- global info
-
- set next [$info(Wizard) step next]
-
- ## If this is the last step, call the action to exit the install.
- if {![string length $next]} {
- ::InstallJammer::actions::Exit $obj
- } else {
- after 0 [list $info(Wizard) next 1]
- }
- }
-
- proc ::InstallJammer::actions::UninstallLeftoverFiles {obj} {
- ::InstallJammer::actions::UninstallSelectedFiles $obj 1
- }
-
- proc ::InstallJammer::actions::UninstallSelectedFiles {obj {force 0}} {
- global conf
- global info
-
- set id [$obj id]
- set parent [$obj parent]
-
- set info(Errors) ""
- set info(FileBeingUninstalled) ""
- set info(GroupBeingUninstalled) ""
-
- ::InstallJammer::UpdateWidgets -update 1
-
- if {!$force} {
- if {[catch { open $info(InstallLog) } fp]} { return }
- while {[gets $fp line] != -1} {
- lappend array([lindex $line 0]) [lrange $line 1 end]
- }
- close $fp
- } else {
- upvar #0 ::leftovers array
- }
-
- set fileLen 0
- if {[info exists array(:FILE)]} {
- set fileLen [llength $array(:FILE)]
- }
-
- set dirLen 0
- if {[info exists array(:DIR)]} {
- set dirLen [llength $array(:DIR)]
- }
-
- set regLen 0
- if {[info exists array(:REGISTRY)]} {
- set regLen [llength $array(:REGISTRY)]
- }
-
- set conf(total) [expr $fileLen + $dirLen + $regLen]
-
- set info(Status) "<%FileBeingUninstalledText%>"
-
- set info(GroupBeingUninstalled) "files"
- ::InstallJammer::UpdateWidgets -update 1
-
- for {set i [expr $fileLen -1]} {$i >= 0} {incr i -1} {
- set list [lindex $array(:FILE) $i]
- set file [lindex $list 0]
- set tail [file tail $file]
-
- set info(FileBeingUninstalled) $tail
- ::InstallJammer::UpdateUninstallProgress
-
- if {[catch {::InstallJammer::UninstallFile $file} error]} {
- lappend ::leftovers(:FILE) $list
- append info(Errors) "$error\n"
- }
- }
-
- set info(GroupBeingUninstalled) "directories"
- ::InstallJammer::UpdateWidgets -update 1
-
- set p $::tcl_platform(platform)
- set installdir [::InstallJammer::Normalize $info(InstallDir)]
- for {set i [expr $dirLen -1]} {$i >= 0} {incr i -1} {
- set list [lindex $array(:DIR) $i]
- lassign $list dir forcedir
- if {$force} { set forcedir -force }
-
- set info(FileBeingUninstalled) [file tail $dir]
- ::InstallJammer::UpdateUninstallProgress
-
- if {!$force && ![::InstallJammer::DirIsEmpty $dir]} {
- ## Make a special case for directories named after
- ## the Company. This is a common thing on Windows,
- ## and we don't want to blow away the whole company
- ## directory even if our program was the one who
- ## installed it.
- if {[lindex [file split $dir] end] ne $info(Company)} {
- lappend ::leftovers(:DIR) $list
- append info(Errors) "[::InstallJammer::Normalize $dir $p] "
- append info(Errors) "is not empty\n"
- }
-
- continue
- }
-
- if {[catch {::InstallJammer::UninstallDirectory $dir $forcedir} err]} {
- append info(Errors) "$err\n"
- }
- }
-
- if {$conf(windows)} {
- set info(GroupBeingUninstalled) "registry entries"
- ::InstallJammer::UpdateWidgets -update 1
-
- set command ::InstallJammer::UninstallRegistryKey
- for {set i [expr $regLen -1]} {$i >= 0} {incr i -1} {
- set list [lindex $array(:REGISTRY) $i]
- lassign $list key value
- ::InstallJammer::UpdateUninstallProgress
-
- if {[catch {eval $command $list} error]} {
- lappend ::leftovers(:REGISTRY) $list
- append info(Errors) "Could not remove $list: $error\n"
- }
- }
- }
-
- ## Cleanup the install registry.
- set infodir [::InstallJammer::InstallInfoDir]
- if {[file exists $infodir]} {
- catch { file delete -force $infodir }
- }
-
- set info(ErrorsOccurred) [expr {[string length $info(Errors)] > 0}]
-
- return 1
- }
-
-
- proc ::InstallJammer::conditions::AskYesOrNo {obj} {
- $obj properties props
-
- set id [$obj id]
-
- set title [::InstallJammer::GetText $id Title]
- set message [::InstallJammer::GetText $id Message]
-
- set args [list -type yesno -title $title -message $message]
- lappend args -icon $props(Icon)
- lappend args -default [string tolower $props(DefaultButton)]
- lappend args -parent [::InstallJammer::TransientParent]
-
- set result [eval ::InstallJammer::MessageBox $args]
-
- if {[string length $props(ResultVirtualText)]} {
- global info
- set info($props(ResultVirtualText)) $result
- }
-
- return [string equal -nocase $result $props(TrueValue)]
- }
-
- proc ::InstallJammer::conditions::StringIsCondition {obj} {
- $obj properties props
-
- debug "Checking to see if $props(String) is $props(Operator)"
-
- set string [::InstallJammer::SubstText $props(String)]
- return [string is $props(Operator) $string]
- }
-
-
- proc CreateWindow.Uninstall {wizard id} {
- CreateWindow.CustomBlankPane2 $wizard $id
-
- set base [$id widget get ClientArea]
-
- grid rowconfigure $base 0 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- set frame [frame $base.frame]
- grid $frame -row 0 -column 0 -sticky new
-
- grid rowconfigure $frame 1 -weight 1
- grid columnconfigure $frame 0 -weight 1
-
- label $frame.file -anchor w
- grid $frame.file -row 0 -column 0 -sticky new
- $id widget set FileValue -widget $frame.file
-
- ttk::progressbar $frame.progress
- grid $frame.progress -row 1 -column 0 -sticky ew
- $id widget set ProgressValue -widget $frame.progress -type progress
- }
-
- proc CreateWindow.UninstallDetails {wizard id} {
- CreateWindow.CustomTextPane1 $wizard $id
- }
-
- proc CreateWindow.UninstallComplete {wizard id} {
- CreateWindow.CustomBlankPane1 $wizard $id
- }
-
- proc CreateWindow.CustomBlankPane2 {wizard id} {
- set base [$wizard widget get $id]
- set frame $base.titleframe
-
- grid rowconfigure $base 3 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- frame $frame -bd 0 -relief flat -background white
- grid $frame -row 0 -column 0 -sticky nsew
-
- grid rowconfigure $frame 1 -weight 1
- grid columnconfigure $frame 0 -weight 1
-
- Label $frame.title -background white -anchor nw -justify left -autowrap 1 -font TkCaptionFont -textvariable [$wizard variable $id -text1]
- grid $frame.title -row 0 -column 0 -sticky new -padx 5 -pady 5
- $id widget set Title -widget $frame.title
-
- Label $frame.subtitle -background white -anchor nw -autowrap 1 -justify left -textvariable [$wizard variable $id -text2]
- grid $frame.subtitle -row 1 -column 0 -sticky new -padx [list 20 5]
- $id widget set Subtitle -widget $frame.subtitle
-
- label $frame.icon -borderwidth 0 -background white -anchor c
- grid $frame.icon -row 0 -column 1 -rowspan 2
- $id widget set Icon -widget $frame.icon -type image
-
- Separator $base.separator -relief groove -orient horizontal
- grid $base.separator -row 1 -column 0 -sticky ew
-
- Label $base.caption -anchor nw -justify left -autowrap 1 -textvariable [$wizard variable $id -text3]
- grid $base.caption -row 2 -sticky nsew -padx 8 -pady [list 8 4]
- $id widget set Caption -widget $base.caption
-
- frame $base.clientarea
- grid $base.clientarea -row 3 -sticky nsew -padx 8 -pady 4
- $id widget set ClientArea -widget $base.clientarea -type frame
-
- Label $base.message -anchor nw -justify left -autowrap 1 -textvariable [$wizard variable $id -text4]
- grid $base.message -row 4 -sticky nsew -padx 8 -pady [list 4 8]
- $id widget set Message -widget $base.message
- }
-
- proc CreateWindow.CustomTextPane1 {wizard id} {
- CreateWindow.CustomBlankPane2 $wizard $id
-
- set base [$id widget get ClientArea]
-
- grid rowconfigure $base 0 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- frame $base.frame
- grid $base.frame -row 0 -column 0 -sticky news
-
- grid rowconfigure $base.frame 0 -weight 1
- grid columnconfigure $base.frame 0 -weight 1
-
- if {![$id get TextFont font]} { set font TkTextFont }
-
- text $base.frame.text -bg white -font $font -wrap word -highlightthickness 0 -yscrollcommand "$base.frame.vs set" -xscrollcommand "$base.frame.hs set"
- grid $base.frame.text -row 0 -column 0 -sticky news
- $id widget set Text -widget $base.frame.text
-
- ttk::scrollbar $base.frame.vs -command "$base.frame.text yview"
- grid $base.frame.vs -row 0 -column 1 -sticky ns
-
- ttk::scrollbar $base.frame.hs -command "$base.frame.text xview" -orient horizontal
- grid $base.frame.hs -row 1 -column 0 -sticky ew
- }
-
- proc CreateWindow.CustomBlankPane1 {wizard id} {
- set base [$wizard widget get $id]
-
- grid rowconfigure $base 1 -weight 1
- grid columnconfigure $base 1 -weight 1
-
- label $base.image -borderwidth 0
- grid $base.image -row 0 -column 0 -rowspan 2 -sticky nw
- $id widget set Image -type image -widget $base.image
-
- Label $base.title -height 3 -bg white -font TkCaptionFont -autowrap 1 -anchor nw -justify left
- grid $base.title -row 0 -column 1 -sticky ew -padx 20 -pady [list 20 10]
- $id widget set Caption -type text -widget $base.title
-
- Label $base.message -bg white -autowrap 1 -anchor nw -justify left
- grid $base.message -row 1 -column 1 -sticky news -padx 20
- $id widget set Message -type text -widget $base.message
-
- Separator $base.sep -orient horizontal
- grid $base.sep -row 2 -column 0 -columnspan 2 -sticky ew
- }
-
-
- proc ThemeInit {} {
- global info
-
- Wizard $info(Wizard) -width 500 -height 365 -raisecommand [list RaiseStep %W %S] -separatortext "Check n Do" -title [::InstallJammer::SubstText "Uninstall <%AppName%>"]
-
- bind $info(Wizard) <<WizardFinish>> [list ::InstallJammer::exit 1]
-
- if {$::tcl_platform(platform) eq "unix"} {
- $info(Wizard) configure -bg [style configure . -background]
- }
- }
-
-
- if {[info exists ::InstallJammer]} { return }
-
- proc ::InstallJammer::UpdateUninstallProgress {} {
- global conf
- global info
-
- incr0 conf(num)
- set pct [expr ($conf(num) * 100) / $conf(total)]
- set info(UninstallPercentComplete) $pct
-
- ::InstallJammer::UpdateWidgets -update 1
- }
-
- proc ::InstallJammer::exit { {prompt 0} } {
- global conf
- global info
-
- if {$info(WizardStarted) && !$info(InstallCancelled)} {
- ::InstallJammer::ExecuteActions "Finish Actions"
- } else {
- ::InstallJammer::ExecuteActions "Cancel Actions"
- }
-
- if {$conf(windows)} { ::InstallJammer::WriteDoneFile }
-
- if {$conf(debugging) && [info exists ::debugfp]} { close $::debugfp }
-
- ::exit
- }
-
- proc ::InstallJammer::UninstallMain {} {
- global conf
- global info
-
- if {$::tcl_platform(platform) eq "unix"} {
- if {$info(RequireRoot) && !$info(UserIsRoot)} {
- ::InstallJammer::Message -title "Root Required" -message "You must be root to run uninstall this application."
- exit 1
- }
- }
-
- if {$info(SilentMode)} {
- if {$conf(windows)} {
- after 1000
- }
-
- ::InstallJammer::ExecuteActions "Startup Actions"
- ::InstallJammer::ExecuteActions Silent
- } else {
- BWidget::use ttk 1 -force
-
- ::InstallJammer::ExecuteActions "Startup Actions"
-
- set info(WizardStarted) 1
- ::InstallJammer::CenterWindow $info(Wizard)
- ::InstallJammer::Wizard next
- }
- }
-
- proc ::InstallJammer::InitUninstall {} {
- global conf
- global info
- global argv
-
- ::InstallJammer::CommonInit
-
- if {$conf(windows)} {
- package require Wintcl
-
- set uninstall $conf(exe)
- set test [file join [file dirname $uninstall] .uninstall]
- if {![file exists $test]} {
- set new [::InstallJammer::TmpDir [file tail $uninstall]]
- file copy $uninstall $new
- close [open [::InstallJammer::TmpDir .uninstall] w]
- eval exec [list $new] $argv &
- ::exit
- }
-
- set info(Temp) [file dirname $uninstall]
- cd $info(Temp)
- }
-
- ::InstallJammer::ReadMessageCatalog messages
-
- set conf(stop) [::InstallJammer::TmpDir .stop]
- set conf(pause) [::InstallJammer::TmpDir .pause]
-
- array set info {
- ErrorsOccurred 0
- FileBeingUninstalled ""
- GroupBeingUninstalled ""
- UninstallPercentComplete 0
-
- RunningUninstaller 1
- }
-
- set info(Status) "Preparing to uninstall..."
-
- SafeArraySet info {
- FileBeingUninstalledText "Removing <%FileBeingUninstalled%>"
- GroupBeingUninstalledText "Removing <%GroupBeingUninstalled%>"
- }
-
- lappend logs [file join $::installkit::root install.log]
- lappend logs [::InstallJammer::InstallInfoDir install.log]
- foreach log $logs {
- if {[file exists $log]} {
- set info(InstallLog) $log
- break
- }
- }
-
- foreach arg $argv {
- switch -- $arg {
- "-S" {
- set info(SilentMode) 1
- set info(InstallMode) "Silent"
- }
-
- "-Y" {
- set info(DefaultMode) 1
- set info(InstallMode) "Default"
- }
-
- default {
- if {[file exists $arg]} {
- set info(InstallLog) $arg
- }
-
- break
- }
- }
- }
-
- if {!$info(SilentMode)} { InitGui }
- }
-
- ::InstallJammer::InitUninstall
-
-
-
-
- proc RaiseStep { wizard id } {
- if {![string length [::InstallJammer::GetText $id Caption]]} {
- grid remove [$id widget get Caption]
- } else {
- grid [$id widget get Caption]
- }
-
- if {![string length [::InstallJammer::GetText $id Message]]} {
- grid remove [$id widget get Message]
- } else {
- grid [$id widget get Message]
- }
-
- if {[string length [$id widget get ClientArea]]} {
- grid configure $wizard.buttons -pady {18 5}
- } else {
- grid configure $wizard.buttons -pady 5
- }
- }
-
- InstallType ::Common
- InstallType ::Standard
- InstallComponent F8912289-F9F6-4C2E-8058-C38BD7F3E27B -setup Uninstall -title Uninstall -component Uninstall -type pane -active Yes -parent Standard
- InstallComponent 35AA10E9-28BC-4695-BC2F-68DA00EE1E4D -setup Uninstall -title {Delete File} -component DeleteFile -type action -active Yes -parent F8912289-F9F6-4C2E-8058-C38BD7F3E27B
- InstallComponent F799E315-34DC-4C43-9820-835EFE017509 -setup Uninstall -title {Modify Widget} -component ModifyWidget -type action -active Yes -parent F8912289-F9F6-4C2E-8058-C38BD7F3E27B
- InstallComponent 616C0583-E61A-4F7C-B865-9089F3B745FA -setup Uninstall -title {Execute Action} -component ExecuteAction -type action -active Yes -parent F8912289-F9F6-4C2E-8058-C38BD7F3E27B
- InstallComponent 579EFC8C-CC0C-4446-84A0-B218E254A6E7 -setup Uninstall -conditions {9C5D86BD-8E00-4D68-B230-100344377DB1 DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC} -title {Uninstall Leftover Files} -component UninstallLeftoverFiles -command insert -type action -active Yes -parent F8912289-F9F6-4C2E-8058-C38BD7F3E27B
- Condition 9C5D86BD-8E00-4D68-B230-100344377DB1 -active Yes -parent 579EFC8C-CC0C-4446-84A0-B218E254A6E7 -title {String Is Condition} -component StringIsCondition
- Condition DB6D2B8B-FC79-4E20-B2AD-566D8767FCBC -active Yes -parent 579EFC8C-CC0C-4446-84A0-B218E254A6E7 -title {Ask Yes or No} -component AskYesOrNo
- InstallComponent A2364EBD-0BAE-4C4B-BF65-D486384DFFE2 -setup Uninstall -title {Move Forward} -component MoveForward -type action -active Yes -parent F8912289-F9F6-4C2E-8058-C38BD7F3E27B
- InstallComponent 39A03798-2744-48BB-8077-84B333E50E14 -setup Uninstall -conditions 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B -title {Uninstall Details} -component UninstallDetails -command insert -type pane -active Yes -parent Standard
- Condition 93DC7CF7-979D-45D2-AD0F-CAFAEA76373B -active Yes -parent 39A03798-2744-48BB-8077-84B333E50E14 -title {String Is Condition} -component StringIsCondition
- InstallComponent E407FB36-48CE-4081-9051-6BAA771E761A -setup Uninstall -title {Uninstall Complete} -component UninstallComplete -type pane -active Yes -parent Standard
- InstallType ::Default
- InstallType ::Silent
- InstallComponent 213B7E89-C364-4995-859C-ABA65D4C3EDE -setup Uninstall -title {Execute Action} -component ExecuteAction -type action -active Yes -parent Silent
- InstallComponent E0FCA78E-F97E-4D8A-B800-6A1E33E5D8DB -setup Uninstall -title Exit -component Exit -type action -active Yes -parent Silent
- InstallType ::ActionGroups
- InstallComponent 47F70A4D-19E3-4751-B84C-E544AB8FD345 -setup Uninstall -title {Startup Actions} -type actiongroup -active Yes -parent ActionGroups
- InstallComponent 1016F936-2BE9-4ECB-8539-82A68DBBAA74 -setup Uninstall -title {Uninstall Actions} -type actiongroup -active Yes -parent ActionGroups
- InstallComponent E0E9AB16-3718-4359-99DE-7A7B80960AFF -setup Uninstall -title {Uninstall Selected Files} -component UninstallSelectedFiles -type action -active Yes -parent 1016F936-2BE9-4ECB-8539-82A68DBBAA74
- InstallComponent 22B753EA-DE2A-4B20-A945-224738E90986 -setup Uninstall -title {Finish Actions} -type actiongroup -active Yes -parent ActionGroups
- InstallComponent 9A3D786A-9CE4-4F36-8EAD-C0A12029BF1A -setup Uninstall -title {Cancel Actions} -type actiongroup -active Yes -parent ActionGroups
-
-
- proc main {} {
- ::InstallJammer::UninstallMain
- }
-
- if {![info exists ::InstallJammer]} { main }
-
- } conditions.tcl {proc ::InstallJammer::conditions::FileExistsCondition {obj} {
- $obj properties props
-
- debug "Checking to see if $props(Filename) $props(Operator)"
-
- set file [::InstallJammer::SubstText $props(Filename)]
-
- if {$props(Operator) eq "exists"} {
- return [file exists $file]
- } else {
- return [expr {![file exists $file]}]
- }
- }
-
- proc ::InstallJammer::conditions::FilePermissionCondition {obj} {
- global conf
- global info
-
- $obj properties props
-
- if {$props(Permission) eq "can create"} {
- debug "Checking to see if we can create $props(Filename)"
- } else {
- debug "Checking to see if $props(Filename) $props(Permission)"
- }
-
- set file [::InstallJammer::SubstText $props(Filename)]
-
- switch -- $props(Permission) {
- "is readable" {
- return [file readable $file]
- }
-
- "is writable" {
- return [::InstallJammer::DirIsWritable $file]
- }
-
- "can create" {
- set info(Dir) $file
- if {[file exists $info(Dir)]} {
- return [::InstallJammer::DirIsWritable $info(Dir)]
- }
-
- set info(Dir) $file
- while {![file exists $info(Dir)]} {
- set info(Dir) [file dirname $info(Dir)]
- if {[file exists $info(Dir)]} {
- return [::InstallJammer::DirIsWritable $info(Dir)]
- }
-
- if {[llength [file split $info(Dir)]] <= 1} { return 0 }
- }
- }
- }
- }
-
- proc ::InstallJammer::conditions::PlatformCondition {obj} {
- global info
-
- $obj properties props
-
- debug "Checking to see if <%Platform%> $props(Operator) $props(Platform)"
-
- switch -- $props(Operator) {
- "is" {
- return [expr {$info(Platform) eq $props(Platform)}]
- }
-
- "is not" {
- return [expr {$info(Platform) ne $props(Platform)}]
- }
- }
- }
-
- proc ::InstallJammer::conditions::ScriptCondition {obj} {
- return [::InstallJammer::EvalCondition [$obj get Script]]
- }
-
- proc ::InstallJammer::conditions::StringIsCondition {obj} {
- $obj properties props
-
- debug "Checking to see if $props(String) is $props(Operator)"
-
- set string [::InstallJammer::SubstText $props(String)]
- return [string is $props(Operator) $string]
- }
-
- } unpack.tcl ##\ \$Id\$\n##\n##\ Copyright\ (C)\ 2002\ \ Damon\ Courtney\n##\ \n##\ This\ program\ is\ free\ software\;\ you\ can\ redistribute\ it\ and/or\n##\ modify\ it\ under\ the\ terms\ of\ the\ GNU\ General\ Public\ License\n##\ as\ published\ by\ the\ Free\ Software\ Foundation\;\ either\ version\ 2\n##\ of\ the\ License,\ or\ (at\ your\ option)\ any\ later\ version.\n##\ \n##\ This\ program\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,\n##\ but\ WITHOUT\ ANY\ WARRANTY\;\ without\ even\ the\ implied\ warranty\ of\n##\ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.\ \ See\ the\n##\ GNU\ General\ Public\ License\ for\ more\ details.\n##\ \n##\ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ General\ Public\ License\n##\ along\ with\ this\ program\;\ if\ not,\ write\ to\ the\n##\ \ \ \ \ Free\ Software\ Foundation,\ Inc.\n##\ \ \ \ \ 51\ Franklin\ Street,\ Fifth\ Floor\n##\ \ \ \ \ Boston,\ MA\ \ 02110-1301,\ USA.\n##\n\nif\ \{\[info\ exists\ ::InstallJammer\]\}\ \{\ return\ \}\n\nif\ \{\[info\ exists\ ::tcl_platform(threaded)\]\}\ \{\n\ \ \ \ proc\ output\ \{\ line\ \}\ \{\n\ \ \ \ \ \ \ \ thread::send\ \$::parentThread\ \[list\ ::InstallJammer::UnpackOutput\ \$line\]\n\ \ \ \ \}\n\}\ else\ \{\n\ \ \ \ proc\ output\ \{string\}\ \{\n\ \ \ \ \ \ \ \ global\ conf\n\n\ \ \ \ \ \ \ \ catch\ \{\ puts\ \$conf(runlogFp)\ \$string\ \}\n\ \ \ \ \ \ \ \ puts\ stdout\ \$string\n\n\ \ \ \ \ \ \ \ catch\ \{\ flush\ \$conf(runlogFp)\ \}\n\ \ \ \ \ \ \ \ flush\ stdout\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::InstallFiles\ \{\}\ \{\n\ \ \ \ global\ info\n\ \ \ \ global\ files\n\ \ \ \ global\ groups\n\n\ \ \ \ set\ info(unpackTotal)\ 0\n\n\ \ \ \ ::InstallJammer::CreateDir\ \$info(InstallDir)\n\n\ \ \ \ foreach\ group\ \$groups\ \{\n\ \ \ \ \ \ \ \ output\ \[list\ :GROUP\ \[\$group\ name\]\ \[\$group\ directory\]\]\n\n\ \ \ \ \ \ \ \ \$group\ install\n\n\ \ \ \ \ \ \ \ ##\ The\ group\ may\ not\ have\ any\ actual\ files.\n\ \ \ \ \ \ \ \ if\ \{!\[info\ exists\ files(\$group)\]\}\ \{\ continue\ \}\n\n\ \ \ \ \ \ \ \ foreach\ file\ \$files(\$group)\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ output\ \[list\ :FILE\ \[\$file\ destfile\]\ \[\$file\ version\]\]\n\ \ \ \ \ \ \ \ \ \ \ \ if\ \{!\[\$file\ install\]\}\ \{\ return\ \}\n\ \ \ \ \ \ \ \ \}\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::IncrProgress\ \{bytes\}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ if\ \{\$info(TotalSize)\ ==\ 0\}\ \{\n\toutput\ \":PERCENT\ 100\"\n\treturn\n\ \ \ \ \}\n\ \ \ \ iincr\ info(unpackTotal)\ \$bytes.0\n\ \ \ \ iincr\ info(unpackSoFar)\ \$bytes.0\n\ \ \ \ if\ \{\$info(TotalSize)\ >\ 0\}\ \{\n\tset\ x\ \[expr\ round(\ (\$info(unpackTotal)\ *\ 100.0)\ /\ \$info(TotalSize)\ )\]\n\toutput\ \":PERCENT\ \$x\"\n\ \ \ \ \}\n\ \ \ \ if\ \{\$info(FileSize)\ >\ 0\}\ \{\n\tset\ x\ \[expr\ round(\ (\$info(unpackSoFar)\ *\ 100.0)\ /\ \$info(FileSize)\ )\]\n\toutput\ \":FILEPERCENT\ \$x\"\n\ \ \ \ \}\n\}\n\n#\ Unpack\ a\ file\ from\ the\ installer\ into\ a\ native\ location.\n#\n#\ path\ \ \ \ \ \ =\ path\ of\ packed\ file\ to\ unpack\n#\ destdir\ \ \ =\ optional\ destination\ directory\ for\ unpacked\ file.\n#\ chunkSize\ =\ The\ size\ of\ bites\ to\ read\ each\ time.\n#\n#\ Returns:\ on\ success,\ the\ name\ of\ the\ native\ file\n#\ \ \ \ \ \ \ \ \ \ on\ failure,\ an\ empty\ string\n#\nproc\ ::InstallJammer::unpack\ \{\ src\ dest\ \{permissions\ \"\"\}\ \}\ \{\n\ \ \ \ global\ conf\n\ \ \ \ global\ info\n\n\ \ \ \ if\ \{!\[PauseCheck\]\}\ \{\ return\ \}\n\n\ \ \ \ set\ chunkSize\ 50000\n\n\ \ \ \ if\ \{\$conf(rollback)\ &&\ \[file\ exists\ \$dest\]\}\ \{\n\ \ \ \ \ \ \ \ ::InstallJammer::SaveForRollback\ \$dest\n\ \ \ \ \}\n\n\ \ \ \ if\ \{!\[string\ length\ \$permissions\]\}\ \{\ set\ permissions\ 0666\ \}\n\n\ \ \ \ #\ Extract\ the\ file\ and\ copy\ it\ to\ its\ location.\n\ \ \ \ set\ fin\ \[open\ \$src\ r\]\n\ \ \ \ if\ \{\[catch\ \{open\ \$dest\ w\ \$permissions\}\ fout\]\}\ \{\n\tclose\ \$fin\n\treturn\ -code\ error\ \$fout\n\ \ \ \ \}\n\n\ \ \ \ fconfigure\ \$fin\ \ -translation\ binary\ -buffersize\ \$chunkSize\ -encoding\ binary\n\ \ \ \ fconfigure\ \$fout\ -translation\ binary\ -buffersize\ \$chunkSize\ -encoding\ binary\n\n\ \ \ \ set\ info(unpackSoFar)\ 0\n\ \ \ \ set\ conf(unpackFin)\ \ \ \$fin\n\ \ \ \ set\ conf(unpackFout)\ \ \$fout\n\ \ \ \ unset\ -nocomplain\ info(unpackDone)\n\ \ \ \ unpackfile\ \$fin\ \$fout\ \$chunkSize\ 0\n\ \ \ \ vwait\ ::info(unpackDone)\n\n\ \ \ \ return\ \$dest\n\}\n\nproc\ ::InstallJammer::unpackfile\ \{in\ out\ size\ bytes\ \{error\ \"\"\}\}\ \{\n\ \ \ \ global\ info\n\n\ \ \ \ if\ \{!\[PauseCheck\]\}\ \{\n\ \ \ \ \ \ \ \ set\ error\ \"Install\ Stopped\"\n\ \ \ \ \}\n\n\ \ \ \ IncrProgress\ \$bytes\n\n\ \ \ \ if\ \{\[string\ length\ \$error\]\ ||\ \[eof\ \$in\]\}\ \{\n\tclose\ \$in\n\tclose\ \$out\n\tset\ info(unpackDone)\ \$info(unpackTotal)\n\ \ \ \ \}\ else\ \{\n\t::fcopy\ \$in\ \$out\ -size\ \$size\ \\\n\t\ \ \ \ -command\ \[list\ ::InstallJammer::unpackfile\ \$in\ \$out\ \$size\]\n\ \ \ \ \}\n\}\n\nproc\ ::InstallJammer::InstallLog\ \{\ string\ \}\ \{\n\ \ \ \ output\ \[list\ :LOG\ \$string\]\n\}\n\nproc\ ::InstallJammer::exit\ \{\}\ \{\n\ \ \ \ global\ info\n\ \ \ \ global\ conf\n\n\ \ \ \ if\ \{!\$conf(threaded)\}\ \{\n\ \ \ \ \ \ \ \ ::InstallJammer::WriteDoneFile\ \$info(Temp)\n\n\ \ \ \ \ \ \ \ catch\ \{\ close\ \$conf(runlogFp)\ \}\n\ \ \ \ \ \ \ \ catch\ \{\ close\ \$conf(unpackFin)\ \ \}\n\ \ \ \ \ \ \ \ catch\ \{\ close\ \$conf(unpackFout)\ \}\n\n\ \ \ \ \ \ \ \ ::exit\n\ \ \ \ \}\n\n\ \ \ \ output\ :DONE\n\}\n\nproc\ ::InstallJammer::UnpackMain\ \{\}\ \{\n\ \ \ \ global\ info\n\ \ \ \ global\ conf\n\n\ \ \ \ catch\ \{\ wm\ withdraw\ .\ \}\n\n\ \ \ \ set\ conf(pwd)\ \[file\ dirname\ \[info\ nameofexe\]\]\n\n\ \ \ \ if\ \{!\[info\ exists\ ::tcl_platform(threaded)\]\}\ \{\n\ \ \ \ \ \ \ \ set\ info(Temp)\ \$conf(pwd)\n\ \ \ \ \ \ \ \ uplevel\ #0\ \[list\ source\ \[file\ join\ \$conf(pwd)\ unpack.ini\]\]\n\ \ \ \ \}\n\n\ \ \ \ ::InstallJammer::CommonInit\n\n\ \ \ \ set\ conf(stop)\ \ \[TmpDir\ .stop\]\n\ \ \ \ set\ conf(pause)\ \[TmpDir\ .pause\]\n\n\ \ \ \ ::InstallJammer::InitSetup\n\ \ \ \ ::InstallJammer::InitFiles\n\n\ \ \ \ if\ \{!\[info\ exists\ ::tcl_platform(threaded)\]\}\ \{\n\ \ \ \ \ \ \ \ set\ conf(vfs)\ /installkitunpackvfs\n\ \ \ \ \ \ \ \ ::installkit::Mount\ \$info(installer)\ \$conf(vfs)\n\ \ \ \ \ \ \ \ set\ conf(runlogFp)\ \[open\ \[TmpDir\ run.log\]\ w\]\n\ \ \ \ \}\n\n\ \ \ \ set\ conf(rollback)\ \[string\ match\ \"*Rollback*\"\ \$info(CancelledInstallAction)\]\n\n\ \ \ \ ::InstallJammer::InstallFiles\n\n\ \ \ \ ::InstallJammer::exit\n\}\n\n::InstallJammer::UnpackMain\n}
-
- proc RaiseStep { wizard id } {
- if {![string length [::InstallJammer::GetText $id Caption]]} {
- grid remove [$id widget get Caption]
- } else {
- grid [$id widget get Caption]
- }
-
- if {![string length [::InstallJammer::GetText $id Message]]} {
- grid remove [$id widget get Message]
- } else {
- grid [$id widget get Message]
- }
-
- if {[string length [$id widget get ClientArea]]} {
- grid configure $wizard.buttons -pady {18 5}
- } else {
- grid configure $wizard.buttons -pady 5
- }
- }
-
- proc CreateWindow.License {wizard id} {
- CreateWindow.CustomTextPane1 $wizard $id
-
- if {![$id get UserMustAcceptLicense]} { return }
-
- set base [$id widget get ClientArea]
-
- ttk::radiobutton $base.accept -variable ::info(LicenseAccepted) -value 1 -command [list $wizard itemconfigure next -state normal]
- grid $base.accept -row 1 -column 0 -sticky w
- $id widget set AcceptRadiobutton -widget $base.accept
-
- ttk::radiobutton $base.decline -variable ::info(LicenseAccepted) -value 0 -command [list $wizard itemconfigure next -state disabled]
- grid $base.decline -row 2 -column 0 -sticky w
- $id widget set DeclineRadiobutton -widget $base.decline
- }
-
- proc CreateWindow.CopyFiles {wizard id} {
- CreateWindow.CustomBlankPane2 $wizard $id
-
- set base [$id widget get ClientArea]
-
- grid rowconfigure $base 0 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- set frame [frame $base.frame]
- grid $frame -row 0 -column 0 -sticky new
-
- grid rowconfigure $frame 1 -weight 1
- grid columnconfigure $frame 0 -weight 1
-
- Label $frame.file -anchor w -elide 1 -ellipsis {[...]} -elideside center
- grid $frame.file -row 0 -column 0 -sticky new -padx [list 0 10]
- $id widget set FileLabel -widget $frame.file
-
- ttk::progressbar $frame.progress
- grid $frame.progress -row 1 -column 0 -sticky ew
- $id widget set ProgressValue -widget $frame.progress -type progress
- }
-
- proc CreateWindow.SetupComplete {wizard id} {
- CreateWindow.CustomBlankPane1 $wizard $id
- }
-
- proc CreateWindow.CopyFiles {wizard id} {
- CreateWindow.CustomBlankPane2 $wizard $id
-
- set base [$id widget get ClientArea]
-
- grid rowconfigure $base 0 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- set frame [frame $base.frame]
- grid $frame -row 0 -column 0 -sticky new
-
- grid rowconfigure $frame 1 -weight 1
- grid columnconfigure $frame 0 -weight 1
-
- Label $frame.file -anchor w -elide 1 -ellipsis {[...]} -elideside center
- grid $frame.file -row 0 -column 0 -sticky new -padx [list 0 10]
- $id widget set FileLabel -widget $frame.file
-
- ttk::progressbar $frame.progress
- grid $frame.progress -row 1 -column 0 -sticky ew
- $id widget set ProgressValue -widget $frame.progress -type progress
- }
-
- proc CreateWindow.SelectDestination {wizard id} {
- variable info
-
- CreateWindow.CustomBlankPane2 $wizard $id
-
- set base [$id widget get ClientArea]
-
- grid rowconfigure $base 0 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- labelframe $base.frame -relief groove -bd 2
- grid $base.frame -row 0 -column 0 -sticky sew
- $id widget set DestinationLabel -widget $base.frame
-
- grid rowconfigure $base.frame 0 -weight 1
- grid columnconfigure $base.frame 0 -weight 1
-
- Label $base.frame.destination -anchor nw -textvariable ::info(InstallDir) -elide 1 -elideside center -ellipsis {[...]}
- grid $base.frame.destination -row 0 -column 0 -sticky ew -padx 5 -pady 3
-
- Button $base.frame.browse -command ::InstallJammer::SetInstallDir
- grid $base.frame.browse -row 0 -column 1 -sticky nw -padx 5 -pady [list 0 5]
- $id widget set BrowseButton -widget $base.frame.browse
- }
-
- proc CreateWindow.SetupComplete {wizard id} {
- CreateWindow.CustomBlankPane1 $wizard $id
- }
-
- proc CreateWindow.StartCopyingFiles {wizard id} {
- CreateWindow.CustomTextPane1 $wizard $id
-
- set text [$id widget get Text]
- $text configure -bg [style configure . -background]
- }
-
- proc CreateWindow.Welcome {wizard id} {
- CreateWindow.CustomBlankPane1 $wizard $id
- }
-
- proc CreateWindow.CustomTextPane1 {wizard id} {
- CreateWindow.CustomBlankPane2 $wizard $id
-
- set base [$id widget get ClientArea]
-
- grid rowconfigure $base 0 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- frame $base.frame
- grid $base.frame -row 0 -column 0 -sticky news
-
- grid rowconfigure $base.frame 0 -weight 1
- grid columnconfigure $base.frame 0 -weight 1
-
- if {![$id get TextFont font]} { set font TkTextFont }
-
- text $base.frame.text -bg white -font $font -wrap word -highlightthickness 0 -yscrollcommand "$base.frame.vs set" -xscrollcommand "$base.frame.hs set"
- grid $base.frame.text -row 0 -column 0 -sticky news
- $id widget set Text -widget $base.frame.text
-
- ttk::scrollbar $base.frame.vs -command "$base.frame.text yview"
- grid $base.frame.vs -row 0 -column 1 -sticky ns
-
- ttk::scrollbar $base.frame.hs -command "$base.frame.text xview" -orient horizontal
- grid $base.frame.hs -row 1 -column 0 -sticky ew
- }
-
- proc CreateWindow.CustomBlankPane2 {wizard id} {
- set base [$wizard widget get $id]
- set frame $base.titleframe
-
- grid rowconfigure $base 3 -weight 1
- grid columnconfigure $base 0 -weight 1
-
- frame $frame -bd 0 -relief flat -background white
- grid $frame -row 0 -column 0 -sticky nsew
-
- grid rowconfigure $frame 1 -weight 1
- grid columnconfigure $frame 0 -weight 1
-
- Label $frame.title -background white -anchor nw -justify left -autowrap 1 -font TkCaptionFont -textvariable [$wizard variable $id -text1]
- grid $frame.title -row 0 -column 0 -sticky new -padx 5 -pady 5
- $id widget set Title -widget $frame.title
-
- Label $frame.subtitle -background white -anchor nw -autowrap 1 -justify left -textvariable [$wizard variable $id -text2]
- grid $frame.subtitle -row 1 -column 0 -sticky new -padx [list 20 5]
- $id widget set Subtitle -widget $frame.subtitle
-
- label $frame.icon -borderwidth 0 -background white -anchor c
- grid $frame.icon -row 0 -column 1 -rowspan 2
- $id widget set Icon -widget $frame.icon -type image
-
- Separator $base.separator -relief groove -orient horizontal
- grid $base.separator -row 1 -column 0 -sticky ew
-
- Label $base.caption -anchor nw -justify left -autowrap 1 -textvariable [$wizard variable $id -text3]
- grid $base.caption -row 2 -sticky nsew -padx 8 -pady [list 8 4]
- $id widget set Caption -widget $base.caption
-
- frame $base.clientarea
- grid $base.clientarea -row 3 -sticky nsew -padx 8 -pady 4
- $id widget set ClientArea -widget $base.clientarea -type frame
-
- Label $base.message -anchor nw -justify left -autowrap 1 -textvariable [$wizard variable $id -text4]
- grid $base.message -row 4 -sticky nsew -padx 8 -pady [list 4 8]
- $id widget set Message -widget $base.message
- }
-
- proc CreateWindow.CustomBlankPane1 {wizard id} {
- set base [$wizard widget get $id]
-
- grid rowconfigure $base 1 -weight 1
- grid columnconfigure $base 1 -weight 1
-
- label $base.image -borderwidth 0
- grid $base.image -row 0 -column 0 -rowspan 2 -sticky nw
- $id widget set Image -type image -widget $base.image
-
- Label $base.title -height 3 -bg white -font TkCaptionFont -autowrap 1 -anchor nw -justify left
- grid $base.title -row 0 -column 1 -sticky ew -padx 20 -pady [list 20 10]
- $id widget set Caption -type text -widget $base.title
-
- Label $base.message -bg white -autowrap 1 -anchor nw -justify left
- grid $base.message -row 1 -column 1 -sticky news -padx 20
- $id widget set Message -type text -widget $base.message
-
- Separator $base.sep -orient horizontal
- grid $base.sep -row 2 -column 0 -columnspan 2 -sticky ew
- }
-
-
-
- proc ThemeInit {} {
- variable info
-
- Wizard $info(Wizard) -width 500 -height 365 -raisecommand [list RaiseStep %W %S] -separatortext "Check n Do" -title [::InstallJammer::SubstText "<%AppName%> Setup"]
-
- if {$::tcl_platform(platform) eq "unix"} {
- $info(Wizard) configure -bg [style configure . -background]
- }
- }
-
-
-
- if {[info exists ::InstallJammer]} { return }
-
- proc ::InstallJammer::UpdateInstallInfo {} {
- global info
-
- set info(SpaceRequired) 0
- set info(SelectedComponents) [list]
- set info(SelectedFileGroups) [list]
-
- set required 0
- foreach setuptype [SetupTypes children] {
- if {![$setuptype active]} { continue }
-
- foreach component [$setuptype get Components] {
- if {![$component active]} { continue }
-
- set name [$component name]
- if {[lsearch -exact $info(SelectedComponents) $name] < 0} {
- lappend info(SelectedComponents) $name
- }
-
- foreach filegroup [$component get FileGroups] {
- if {![$filegroup active]} { continue }
-
- incr required [$filegroup get Size]
-
- set name [$filegroup name]
- if {[lsearch -exact $info(SelectedFileGroups) $name] < 0} {
- lappend info(SelectedFileGroups) $name
- }
- }
- }
- }
-
- set info(SpaceRequired) $required
-
- ::InstallJammer::UpdateWidgets
- }
-
- proc ::InstallJammer::PopulateComponents { step } {
- global info
-
- set tree [$step widget get ComponentTree]
- set text [$step widget get DescriptionText]
-
- set setuptype [::InstallJammer::FindObjByName Custom [SetupTypes children]]
-
- if {![string length $setuptype]} { return }
-
- foreach id [$setuptype get Components] {
- if {![$id get ShowComponent]} { continue }
-
- set parent [$id parent]
- if {$parent eq "Components"} { set parent root }
-
- $tree insert end $parent $id -text [$id name] -image checkon
-
- if {[$id get RequiredComponent]} {
- $tree itemconfigure $id -fill SystemDisabledText
- }
-
- if {![info exists node]} { set node $id }
- }
-
- $tree selection set $node
-
- set desc [::InstallJammer::GetText $node Description]
- ::InstallJammer::SetText $text $desc
- ::InstallJammer::SetVirtualText $info(Language) $step [list DescriptionText $desc]
- }
-
- proc ::InstallJammer::SelectComponent { node } {
- global info
-
- set id [$info(Wizard) raise]
- set tree [$id widget get ComponentTree]
- set text [$id widget get DescriptionText]
- set desc [::InstallJammer::GetText $node Description]
-
- $tree selection set $node
-
- ::InstallJammer::SetText $text $desc
-
- ::InstallJammer::SetVirtualText $info(Language) $id [list DescriptionText $desc]
-
- ::InstallJammer::UpdateInstallInfo
- }
-
- proc ::InstallJammer::ToggleComponent { node } {
- global info
-
- set id [$info(Wizard) raise]
- set tree [$id widget get ComponentTree]
-
- if {[$node get RequiredComponent]} { return }
-
- if {[$node active]} {
- $node active 0
- $tree itemconfigure $node -image checkoff
-
- foreach component [$node children recursive] {
- $component active 0
- if {[$tree exists $component]} {
- $tree itemconfigure $component -image checkoff
- }
- }
- } else {
- $node active 1
- $tree itemconfigure $node -image checkon
-
- foreach component [$node children recursive] {
- $component active 1
- if {[$tree exists $component]} {
- $tree itemconfigure $component -image checkon
- }
- }
- }
-
- ::InstallJammer::UpdateInstallInfo
- }
-
- proc ::InstallJammer::PopulateSetupTypes { step } {
- global info
-
- set text [$step widget get DescriptionText]
- set listbox [$step widget get SetupTypeListBox]
-
- foreach id [SetupTypes children] {
- if {![$id active]} { continue }
- $listbox insert end $id -text [$id name] -data [$id name]
- if {[$id name] eq $info(InstallType)} {
- $listbox selection set $id
- set desc [::InstallJammer::GetText $id Description]
- ::InstallJammer::SetText $text $desc
- ::InstallJammer::SetVirtualText $info(Language) $step [list DescriptionText $desc]
- }
- }
- }
-
- proc ::InstallJammer::SelectSetupType { {node ""} } {
- global info
-
- if {[string length $node]} {
- set info(InstallType) [$node name]
-
- set id [$info(Wizard) raise]
- set text [$id widget get DescriptionText]
- set desc [::InstallJammer::GetText $node Description]
-
- ::InstallJammer::SetText $text $desc
-
- ::InstallJammer::SetVirtualText $info(Language) $id [list DescriptionText $desc]
-
- set list [$id widget get SetupTypeListBox]
- $list selection set $node
- }
-
- if {![string equal $info(InstallType) "Custom"]} {
- foreach setuptype [SetupTypes children] {
- if {[string equal [$setuptype name] $info(InstallType)]} {
- $setuptype active 1
- } else {
- $setuptype active 0
- }
- }
- }
-
- ::InstallJammer::UpdateInstallInfo
- }
-
- proc ::InstallJammer::PopulateProgramFolders { step } {
- global conf
-
- set listbox [$step widget get ProgramFolderListBox]
-
- if {$conf(windows)} {
- set folder [list]
- foreach dir {PROGRAMS COMMON_PROGRAMS} {
- set dir [::InstallJammer::WindowsDir $dir]
- eval lappend folders [glob -nocomplain -type d -dir $dir -tails *]
- }
- eval [list $listbox insert end] [lsort -dict -unique $folders]
- }
- }
-
- proc ::InstallJammer::SetProgramFolder { {folder ""} } {
- global conf
- global info
-
- if {![string length $folder]} {
- set step $info(CurrentPane)
- set listbox [$step widget get ProgramFolderListBox]
- set folder [$listbox get [$listbox curselection]]
-
- set list [file split $info(OriginalProgramFolderName)]
- if {[llength $list] > 1} {
- set folder [file join $folder [lindex $list end]]
- } else {
- set folder [file join $folder $info(OriginalProgramFolderName)]
- }
- }
-
- set info(ProgramFolderName) $folder
-
- if {!$info(ProgramFolderAllUsers)} {
- set info(ProgramFolder) "<%PROGRAMS%>/<%ProgramFolderName%>"
- } else {
- set info(ProgramFolder) "<%COMMON_PROGRAMS%>/<%ProgramFolderName%>"
- }
- }
-
- proc ::InstallJammer::ScrollLicenseTextBox { force args } {
- global info
-
- eval $args
-
- if {!$force} { return }
-
- set w [lindex $args 0]
- lassign [$w yview] y0 y1
-
- if {$y1 == 1} {
- $info(Wizard) itemconfigure next -state normal
- } else {
- $info(Wizard) itemconfigure next -state disabled
- }
- }
-
- proc ::InstallJammer::exit { {prompt 0} } {
- global conf
- global info
-
- if {$prompt} {
- ::InstallJammer::PauseInstall
-
- set title "Exit Setup"
- set message [::InstallJammer::SubstText "<%ExitText%>"]
- set ans [MessageBox -type yesno -parent [::InstallJammer::TransientParent] -title $title -message $message]
-
- if {$ans eq "no"} {
- ::InstallJammer::ContinueInstall
- return
- }
-
- set id [$info(Wizard) raise]
- set when "After Pane is Cancelled"
-
- ::InstallJammer::ExecuteActions $id -when $when
-
- if {![$id checkConditions $when]} { return }
-
- set info(InstallCancelled) 1
- }
-
- if {$info(Installing)} {
- ::InstallJammer::StopInstall
-
- tkwait variable ::info(Installing)
-
- if {[string match "*Continue*" $info(CancelledInstallAction)]} {
- }
- }
-
- if {$info(InstallStopped) && $info(InstallStarted)
- && $info(CleanupCancelledInstall)} {
- ::InstallJammer::CleanupCancelledInstall
- }
-
- if {($info(WizardStarted)||$info(SilentMode)) && !$info(InstallCancelled)} {
- ::InstallJammer::ExecuteActions "Finish Actions"
-
- if {!$info(InstallStopped)} {
- ::InstallJammer::LogFile [TmpDir install.log]
- ::InstallJammer::LogFile [InstallInfoDir install.log]
- ::InstallJammer::CreateInstallLog [TmpDir install.log]
- ::InstallJammer::CreateInstallLog [InstallInfoDir install.log]
-
- ::InstallJammer::StoreInstallLogInUninstall
- }
- } else {
- ::InstallJammer::ExecuteActions "Cancel Actions"
- }
-
- ::InstallJammer::CleanupTmpDirs
-
- if {!$conf(debugging)} {
- if {[catch { file delete -force $info(Temp) } error]} {
- ::InstallJammer::WriteDoneFile $info(Temp)
- }
- } else {
- if {[info exists ::debugfp]} { close $::debugfp }
- }
-
- catch { destroy . }
- ::exit
- }
-
- proc ::InstallJammer::StoreInstallLogInUninstall {} {
- global conf
- if {[info exists conf(uninstall)]} {
- zlib::minizip -append 1 $conf(uninstall) [list [TmpDir install.log]] [list install.log]
- }
- }
-
- proc ::InstallJammer::CheckInstallDir { {dir ""} } {
- global info
-
- if {![string length $dir]} { set dir $info(InstallDir) }
-
- while {![file exists $dir]} {
- set dir [file dirname $dir]
- }
-
- set info(Dir) $dir
- set result [::InstallJammer::DirIsWritable $dir]
- if {!$result} {
- ::InstallJammer::MessageBox -title "Error" -message [::InstallJammer::SubstText "<%DirectoryPermissionText%>"]
- }
- return $result
- }
-
- proc ::InstallJammer::SetInstallDir { {dir ""} } {
- global conf
- global info
-
- if {![string length $dir]} {
- set dir [::InstallJammer::ChooseDirectory -initialdir $info(InstallDir)]
- if {![string length $dir]} { return }
- } else {
- set dir [::InstallJammer::SubstText $dir]
- }
-
- if {![CheckInstallDir $dir]} { return }
-
- if {$conf(windows) && [file exists $dir]} {
- set dir [file attributes $dir -longname]
- }
-
- set info(InstallDir) [Normalize $dir $::tcl_platform(platform)]
- }
-
- proc ::InstallJammer::UnpackOutput { line } {
- global conf
- global info
-
- if {[string index $line 0] != ":"} { return }
-
- switch -- [lindex $line 0] {
- ":DONE" {
- set info(FileBeingInstalled) ""
- set info(GroupBeingInstalled) ""
-
- set info(Status) "File installation complete..."
-
- if {[info exists ::tcl_platform(threaded)]} {
- } else {
- catch { close $conf(UnpackFp) }
- }
- set info(Installing) 0
- }
-
- ":LOG" {
- ::InstallJammer::InstallLog [lindex $line 1]
- }
-
- ":GROUP" {
- set info(GroupBeingInstalled) [lindex $line 1]
- }
-
- ":FILE" {
- set file [lindex $line 1]
- set info(FileBeingInstalled) $file
- ::InstallJammer::SetVersionInfo $file [lindex $line 2]
- }
-
- ":PERCENT" {
- set info(InstallPercentComplete) [lindex $line 1]
- }
-
- ":FILEPERCENT" {
- set info(FilePercentComplete) [lindex $line 1]
- }
- }
-
- ::InstallJammer::UpdateWidgets -buttons 0 -updateidletasks 1
- }
-
- proc ::InstallJammer::ReadUnpack { id } {
- global conf
- global info
-
- if {[eof $conf(UnpackFp)]} {
- catch { close $conf(UnpackFp) }
- set info(Installing) 0
- return
- }
-
- gets $conf(UnpackFp) line
-
- ::InstallJammer::UnpackOutput $line
- }
-
- proc ::InstallJammer::BuildUnpackInfo { groupList groupArray } {
- global info
- global versions
-
- upvar 1 $groupArray groups
-
- ::InstallJammer::ReadInfo
-
- set unpack [TmpDir unpack.ini]
-
- set fp [open $unpack w]
-
- puts $fp "set info(installer) [list [info nameofexecutable]]"
- puts $fp "array set info [list [array get info]]"
- puts $fp "set groups [list $groupList]"
- puts $fp "array set files [list [array get groups]]"
- puts $fp ""
- puts $fp "array set versions [list [array get versions]]"
-
- puts -nonewline $fp "array set ::InstallJammer::Properties "
- puts $fp "[list [array get ::InstallJammer::Properties]]"
-
- close $fp
-
- return $unpack
- }
-
- proc ::InstallJammer::BuildUnpack {} {
- global info
- global conf
-
- if {[info exists conf(UnpackBin)]} { return $conf(UnpackBin) }
-
- set unpack [TmpDir unpack.tcl]
- set conf(UnpackScript) $unpack
-
- set fp [open $unpack w]
- foreach file {common.tcl files.tcl setup.tcl conditions.tcl unpack.tcl} {
- puts $fp $::InstallJammer::files($file)
- }
- close $fp
-
- return $unpack
- }
-
- proc ::InstallJammer::CleanupCancelledInstall {} {
- global conf
- global info
-
- set info(Status) "Cleaning up install..."
- ::InstallJammer::UpdateWidgets -update 1
-
- if {![llength $conf(LOG)]} { return }
-
- for {set i [llength $conf(LOG)]} {$i >= 0} {incr i -1} {
- set line [lindex $conf(LOG) $i]
- set type [lindex $line 0]
- set args [lrange $line 1 end]
- switch -- [lindex $line 0] {
- ":FILE" {
- set file [lindex $args 0]
- set roll [::InstallJammer::RollbackName $file]
- if {[file exists $roll]} {
- file rename -force $roll $file
- } else {
- eval UninstallFile $args
- }
- }
-
- ":DIR" {
- eval UninstallDirectory $args
- }
-
- ":REGISTRY" {
- eval UninstallRegistryKey $args
- }
- }
- }
- }
-
- proc ::InstallJammer::CreateInstallLog { {file ""} } {
- global conf
- global info
-
- if {![string length $file]} { set file [TmpDir install.log] }
-
- if {[catch { open $file w } fp]} { return }
-
- ::InstallJammer::LogFile $file
-
- set lines [list ":DIR [list $info(InstallDir)]"]
-
- if {[info exists conf(PREVLOG)]} {
- eval lappend lines $conf(PREVLOG)
- }
-
- eval lappend lines $conf(LOG)
-
- foreach line $lines {
- if {![info exists done($line)]} {
- set done($line) 1
- puts $fp $line
- }
- }
- close $fp
- }
-
- proc ::InstallJammer::InstallLog {string} {
- lappend ::conf(LOG) $string
- }
-
- proc ::InstallJammer::LogRegistry {key {value ""}} {
- set string "[list $key]"
- if {![lempty $value]} { append string " [list $value]" }
- InstallLog ":REGISTRY $string"
- }
-
- proc ::InstallJammer::ReadPreviousInstall {} {
- global conf
- global info
-
- if {[info exists conf(PREVLOG)]} { return }
-
-
- set uninstall [file join $info(InstallDir) uninstall$info(Ext)]
-
- if {[file exists $uninstall]} {
- set dir [::installkit::Mount $uninstall /installkittmpvfs]
- set log [file join $dir install.log]
- if {[file exists $log]} {
- eval lappend conf(PREVLOG) [split [string trim [read_file $log]] \n]
- }
- ::installkit::Unmount $dir
- }
-
- set dir [::InstallJammer::GetInstallInfoDir]
- set file [file join $dir install.log]
-
- if {[file exists $file]} {
- eval lappend conf(PREVLOG) [split [string trim [read_file $file]] \n]
- }
-
- if {[info exists conf(PREVLOG)]} {
- set info(PreviousInstallExists) 1
- foreach x $conf(PREVLOG) {
- if {[lindex $x 0] eq ":DIR"} {
- set info(PreviousInstallDir) [lindex $x 1]
- break
- }
- }
- }
- }
-
- proc ::InstallJammer::StoreInfo { dir {mode w} } {
- global info
- global versions
-
- set file [file join $dir .installinfo]
-
- set fp [open $file $mode]
-
- ::InstallJammer::LogFile $file
-
- foreach file [array names versions] {
- puts $fp "Ver [list $file] $versions($file)"
- }
-
- close $fp
- }
-
- proc ::InstallJammer::ReadInfo {} {
- global info
- global versions
-
- set filename .installinfo
-
- set file [::InstallJammer::InstallInfoDir $filename]
- if {![file exists $file]} {
- set file [file join $info(InstallDir) $filename]
- }
-
- if {[file exists $file]} {
- set fp [open $file]
-
- while {[gets $fp line] != -1} {
- switch -- [lindex $line 0] {
- "Ver" {
- lassign $line cmd file ver
- set versions($file) $ver
- }
- }
- }
-
- close $fp
- }
- }
-
- proc ::InstallJammer::InstallComponentsTotalSize {} {
- global info
-
- if {![info exists info(InstallComponents)]} { return 0 }
-
- set size 0
- foreach list $info(InstallComponents) {
- switch -- [lindex $list 0] {
- "Wrapped Script" {
- iincr size [file size [::installkit::base]]
- }
-
- "Wrapped Application" {
- iincr size [file size $info(Installer)]
- }
- }
- }
- return $size
- }
-
- proc ::InstallJammer::ParseCommandLineArguments { arglist } {
- global conf
- global info
-
- set len [llength $arglist]
- for {set i 0} {$i < $len} {incr i} {
- set opt [lindex $arglist $i]
-
- switch -glob -- $opt {
- "-C" {
- if {!$info(IncludeDebugging)} { continue }
- if {!$conf(windows)} { SourceCachedFile console.tcl }
- console show
- }
-
- "-D" {
- if {!$info(IncludeDebugging)} { continue }
- set conf(debugging) 1
- }
-
- "-D*" {
- set opt [string range $opt 2 end]
- set val [lindex $arglist [incr i]]
- set info($opt) $val
- }
-
- "-S" {
- set info(SilentMode) 1
- set info(InstallMode) "Silent"
- }
-
- "-T" {
- if {!$info(IncludeDebugging)} { continue }
- set conf(testing) 1
- }
-
- "-V" {
- set app $info(AppName)
- set ver $info(Version)
- set title "InstallJammer Installer version $conf(version)"
- set msg [::InstallJammer::SubstText "<%VersionHelpText%>"]
- ::InstallJammer::Message -title $title -message $msg
- ::exit
- }
-
- "-Y" {
- set info(InstallMode) "Default"
- set info(DefaultMode) 1
- }
-
- "--prefix" {
- set val [lindex $arglist [incr i]]
- ::InstallJammer::SetInstallDir $val
- }
- }
- }
-
- set info(GuiMode) [expr {$info(InstallMode) eq "Standard"
- || $info(InstallMode) eq "Default"}]
- }
-
- proc ::InstallJammer::SourceCachedFile { file {namespace ""} } {
- variable files
- if {![info exists files($file)]} { return 0 }
- if {![string length $namespace]} {
- uplevel #0 $files($file)
- } else {
- namespace eval $namespace $files($file)
- }
- return 1
- }
-
- proc ::InstallJammer::AskUserLanguage {} {
- global conf
- global info
-
- variable languages
- variable languagecodes
-
- set list [::InstallJammer::GetLanguages]
-
- if {[llength $list] < 1} { return }
-
- set top .__askLanguage
-
- Dialog $top -title "Language Selection"
- wm resizable $top 0 0
-
- set f [$top getframe]
-
- ttk::label $f.l -text "Please select the installation language"
- pack $f.l -pady 10
-
- ttk::combobox $f.cb -state readonly -textvariable ::conf(Language) -values $list
- pack $f.cb
-
- $top add -text "OK"
- $top add -text "Cancel"
-
- set conf(Language) $info(Language)
- foreach loc $conf(mclocale) {
- if {[info exists languagecodes($loc)]} {
- set conf(Language) $languagecodes($loc)
- break
- }
- }
-
- foreach lang [::msgcat::mcpreferences] {
- if {[info exists languagecodes($lang)]} {
- set conf(Language) $languagecodes($lang)
- break
- }
- }
-
- if {[$top draw] == 1} {
- set info(InstallCancelled) 1
- ::InstallJammer::exit
- }
-
- set info(Language) $languages($conf(Language))
- ::msgcat::mclocale $info(Language)
- }
-
- proc ::InstallJammer::InstallMain {} {
- global conf
- global info
-
- if {$::tcl_platform(platform) eq "unix"} {
- if {$info(RequireRoot) && !$info(UserIsRoot)} {
- ::InstallJammer::Message -title "Root Required" -message [::InstallJammer::SubstText "<%RequireRootText%>"]
- set info(InstallCancelled) 1
- ::InstallJammer::exit 1
- }
- }
-
- if {$info(SilentMode)} {
- ::InstallJammer::ExecuteActions "Startup Actions"
- ::InstallJammer::ExecuteActions Silent
- } else {
- BWidget::use ttk 1 -force
-
- if {$info(AllowLanguageSelection)} {
- ::InstallJammer::AskUserLanguage
- }
-
- ::InstallJammer::ExecuteActions "Startup Actions"
-
- set info(WizardStarted) 1
- ::InstallJammer::CenterWindow $info(Wizard)
- raise $info(Wizard)
- ::InstallJammer::Wizard next
- }
- }
-
- proc ::InstallJammer::InitInstall {} {
- global conf
- global info
-
- if {[string equal $::tcl_platform(platform) "windows"]} {
- package require Wintcl
- }
-
- SourceCachedFile gui.tcl
- SourceCachedFile common.tcl
- SourceCachedFile setup.tcl
- SourceCachedFile files.tcl
- SourceCachedFile actions.tcl
- SourceCachedFile conditions.tcl
-
- ::InstallJammer::CommonInit
-
- array set conf {
- testing 0
- debugging 0
- }
-
- set conf(stop) [::InstallJammer::TmpDir .stop]
- set conf(pause) [::InstallJammer::TmpDir .pause]
-
- array set info {
- Installing 0
- InstallStarted 0
- InstallStopped 0
- InstallFinished 0
- InstallCancelled 0
- WizardStarted 0
- CommonStartMenu /etc/X11/applnk
- KDEStartMenu <%Home%>/.kde/share/applnk
- KDECommonStartMenu /usr/share/applnk
- GnomeStartMenu <%Home%>/.gnome/apps
- GnomeCommonStartMenu /usr/share/gnome/apps
-
- LicenseAccepted No
- FileBeingInstalled ""
- GroupBeingInstalled ""
- InstallPercentComplete 0
-
- PreviousInstallDir ""
- PreviousInstallExists 0
-
- RunningInstaller 1
- }
-
- set conf(LOG) [list]
-
- set conf(rollback) [string match "*Rollback*" $info(CancelledInstallAction)]
-
- set info(Installer) $conf(exe)
- set info(InstallID) [::InstallJammer::uuid]
- set info(InstallSource) [file dirname $conf(exe)]
-
- ::InstallJammer::ParseCommandLineArguments $::argv
-
- if {$info(GuiMode)} {
- SourceCachedFile gui.tcl
- InitGui
- }
-
- ::InstallJammer::InitSetup
- ::InstallJammer::InitFiles
-
- ::InstallJammer::ReadMessageCatalog messages
-
- if {$conf(windows)} {
- set key {HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion}
- catch {
- set info(UserInfoName) [registry get $key RegisteredOwner]
- set info(UserInfoCompany) [registry get $key RegisteredOrganization]
- }
- }
-
- foreach var [list InstallDir ProgramFolderName] {
- set info($var) [::InstallJammer::SubstText <%$var%>]
- set info(Original$var) $info($var)
- }
-
- ::InstallJammer::UpdateInstallInfo
-
- if {$::tcl_platform(platform) eq "unix"} {
- if {$info(RootInstallDir) ne "" && $info(UserIsRoot)} {
- ::InstallJammer::SetInstallDir $info(RootInstallDir)
- }
- }
-
- ::InstallJammer::LoadTwapi
-
- if {0 && [info exists ::tcl_platform(threaded)]} {
- set ::tid [installkit::newThread thread::wait]
- thread::send $::tid [list set info(Ext) $info(Ext)]
- thread::send $::tid [list set info(Temp) $info(Temp)]
- thread::send $::tid [list set info(Platform) $info(Platform)]
- thread::send $::tid [list eval $::InstallJammer::files(common.tcl)]
- thread::send $::tid {
- proc BuildInstallkit {} {
- thread::send $::parentThread "set conf(BuildingInstallkit) 1"
- ::installkit::base
- thread::send $::parentThread "unset -nocomplain conf(BuildingInstallkit)"
- }
- }
- thread::send -async $::tid BuildInstallkit
- }
- }
-
- ::InstallJammer::InitInstall
-
- InstallType ::Common
- InstallType ::Standard
- InstallComponent A2E136B8-114D-4028-876B-5F7DE6E5D06C -setup Install -title {Welcome Screen} -component Welcome -type pane -active Yes -parent Standard
- InstallComponent 26169907-3309-4C13-80BA-E6392EFA3702 -setup Install -title {License Agreement} -component License -type pane -active Yes -parent Standard
- InstallComponent EBE76197-B5AB-4228-BA51-F7780EFD5C07 -setup Install -conditions {2F135310-2F98-4A7C-9DC1-ED574350AA47 0509031B-2E3F-4330-B44F-1E1586B0B38F} -title {Modify Widget} -component ModifyWidget -command insert -type action -active Yes -parent 26169907-3309-4C13-80BA-E6392EFA3702
- Condition 2F135310-2F98-4A7C-9DC1-ED574350AA47 -active Yes -parent EBE76197-B5AB-4228-BA51-F7780EFD5C07 -title {String Is Condition} -component StringIsCondition
- Condition 0509031B-2E3F-4330-B44F-1E1586B0B38F -active Yes -parent EBE76197-B5AB-4228-BA51-F7780EFD5C07 -title {Script Condition} -component ScriptCondition
- InstallComponent 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D -setup Install -conditions 376A656F-918F-49E1-9E01-3E734532FA0F -title {Select Destination} -component SelectDestination -command insert -type pane -active Yes -parent Standard
- Condition 376A656F-918F-49E1-9E01-3E734532FA0F -active Yes -parent 9FF9A6C3-9DBB-4F6E-9724-B57973A3745D -title {File Permission Condition} -component FilePermissionCondition
- InstallComponent 7F7C9C19-3650-4E50-8B27-32C9644DF62B -setup Install -title {Start Copying Files} -component StartCopyingFiles -type pane -active Yes -parent Standard
- InstallComponent 354BBA54-2679-44CC-B528-BB123868926D -setup Install -title {Copying Files} -component CopyFiles -type pane -active Yes -parent Standard
- InstallComponent 5315266E-E68B-435E-AFBC-E218FDC19369 -setup Install -title {Disable Buttons} -component ModifyWidget -type action -active Yes -parent 354BBA54-2679-44CC-B528-BB123868926D
- InstallComponent 1D8EB93F-5852-46CE-B93A-A4ED5672E32F -setup Install -title {Execute Action} -component ExecuteAction -type action -active Yes -parent 354BBA54-2679-44CC-B528-BB123868926D
- InstallComponent A6185DCF-A645-44CE-BCA8-AD0CF2DD3183 -setup Install -title {Move Forward} -component MoveForward -type action -active Yes -parent 354BBA54-2679-44CC-B528-BB123868926D
- InstallComponent 4C3FF654-9F5C-4679-B71D-F23E14F61844 -setup Install -title {Setup Complete} -component SetupComplete -type pane -active Yes -parent Standard
- InstallComponent A41FE23D-88CA-44B9-B9A7-18C2F2879E8D -setup Install -conditions {D34364B6-8486-412D-914A-34A01B029D62 FB0A7015-A12E-4BF1-8044-9D46E9512987} -title {View Readme Checkbutton} -component AddWidget -command insert -type action -active Yes -parent 4C3FF654-9F5C-4679-B71D-F23E14F61844
- Condition D34364B6-8486-412D-914A-34A01B029D62 -active Yes -parent A41FE23D-88CA-44B9-B9A7-18C2F2879E8D -title {File Exists Condition} -component FileExistsCondition
- Condition FB0A7015-A12E-4BF1-8044-9D46E9512987 -active Yes -parent A41FE23D-88CA-44B9-B9A7-18C2F2879E8D -title {String Is Condition} -component StringIsCondition
- InstallComponent 55DB7606-259D-4B3C-A3C1-5CCF6C12638C -setup Install -conditions {80E90A24-8A32-4E27-9C5C-3B5EF6283D1F 71ED690B-1531-4FC1-A869-F347967DE87B} -title {Launch Application Checkbutton} -component AddWidget -command insert -type action -active Yes -parent 4C3FF654-9F5C-4679-B71D-F23E14F61844
- Condition 80E90A24-8A32-4E27-9C5C-3B5EF6283D1F -active Yes -parent 55DB7606-259D-4B3C-A3C1-5CCF6C12638C -title {File Exists Condition} -component FileExistsCondition
- Condition 71ED690B-1531-4FC1-A869-F347967DE87B -active Yes -parent 55DB7606-259D-4B3C-A3C1-5CCF6C12638C -title {String Is Condition} -component StringIsCondition
- InstallComponent 85CBEC09-95F0-4510-8130-23292CD4E280 -setup Install -conditions {50748934-8AC2-4A3C-AC85-D701FAC60C49 00751641-DBBA-47C1-A7B9-0975B0C2644F} -title {Desktop Shortcut Checkbutton} -component AddWidget -command insert -type action -active Yes -parent 4C3FF654-9F5C-4679-B71D-F23E14F61844
- Condition 50748934-8AC2-4A3C-AC85-D701FAC60C49 -active Yes -parent 85CBEC09-95F0-4510-8130-23292CD4E280 -title {File Exists Condition} -component FileExistsCondition
- Condition 00751641-DBBA-47C1-A7B9-0975B0C2644F -active Yes -parent 85CBEC09-95F0-4510-8130-23292CD4E280 -title {String Is Condition} -component StringIsCondition
- InstallComponent D1224075-F20A-4015-A39F-9DCE7111AF5B -setup Install -conditions {426B6A63-5AB7-42BB-B78F-3236D745399B 4439AB66-CCD9-4421-BDB3-851F51B2DEE7 C66D6544-4FCE-4697-B0E4-4B6F3A462973} -title {Quick Launch Shortcut Checkbutton} -component AddWidget -command insert -type action -active Yes -parent 4C3FF654-9F5C-4679-B71D-F23E14F61844
- Condition 426B6A63-5AB7-42BB-B78F-3236D745399B -active Yes -parent D1224075-F20A-4015-A39F-9DCE7111AF5B -title {Platform Condition} -component PlatformCondition
- Condition 4439AB66-CCD9-4421-BDB3-851F51B2DEE7 -active Yes -parent D1224075-F20A-4015-A39F-9DCE7111AF5B -title {File Exists Condition} -component FileExistsCondition
- Condition C66D6544-4FCE-4697-B0E4-4B6F3A462973 -active Yes -parent D1224075-F20A-4015-A39F-9DCE7111AF5B -title {String Is Condition} -component StringIsCondition
- InstallType ::Default
- InstallComponent 44F378EE-B695-45D5-96FE-1BBC93596B1F -setup Install -title {Copying Files} -component CopyFiles -type pane -active Yes -parent Default
- InstallComponent 4C97A1FF-3B60-4E13-9D4E-020C32F5A661 -setup Install -title {Disable Buttons} -component ModifyWidget -type action -active Yes -parent 44F378EE-B695-45D5-96FE-1BBC93596B1F
- InstallComponent CBF10125-0D47-4DBB-9630-0CA6FDA9489B -setup Install -title {Execute Action} -component ExecuteAction -type action -active Yes -parent 44F378EE-B695-45D5-96FE-1BBC93596B1F
- InstallComponent EE3898B7-7F54-4743-87F2-FCBF21BBC5C8 -setup Install -title {Move Forward} -component MoveForward -type action -active Yes -parent 44F378EE-B695-45D5-96FE-1BBC93596B1F
- InstallComponent A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3 -setup Install -title {Setup Complete} -component SetupComplete -type pane -active Yes -parent Default
- InstallComponent 6A4B5CE4-BBF6-4444-8593-E188A69FA768 -setup Install -conditions {AB94C219-6C76-4908-9CCE-99A4E7AB484F 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F} -title {View Readme Checkbutton} -component AddWidget -command insert -type action -active Yes -parent A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3
- Condition AB94C219-6C76-4908-9CCE-99A4E7AB484F -active Yes -parent 6A4B5CE4-BBF6-4444-8593-E188A69FA768 -title {File Exists Condition} -component FileExistsCondition
- Condition 662CEDC2-7F2F-44F4-B260-A7990F8F4E4F -active Yes -parent 6A4B5CE4-BBF6-4444-8593-E188A69FA768 -title {String Is Condition} -component StringIsCondition
- InstallComponent 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4 -setup Install -conditions {77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20 5F9F234B-8C55-46E5-B883-78843926A386} -title {Launch Application Checkbutton} -component AddWidget -command insert -type action -active Yes -parent A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3
- Condition 77FEE21B-4F91-4C17-B6FF-FA8A07FEAE20 -active Yes -parent 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4 -title {File Exists Condition} -component FileExistsCondition
- Condition 5F9F234B-8C55-46E5-B883-78843926A386 -active Yes -parent 4DA01EFD-7C97-4B70-8E91-A5FDC965F7F4 -title {String Is Condition} -component StringIsCondition
- InstallComponent C91C5668-E984-4541-871C-CF6194F3F71F -setup Install -conditions {25542048-E343-4AD5-B1A3-90B504E68373 642021C6-FD45-486A-91AB-8A333627A3D9} -title {Desktop Shortcut Checkbutton} -component AddWidget -command insert -type action -active Yes -parent A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3
- Condition 25542048-E343-4AD5-B1A3-90B504E68373 -active Yes -parent C91C5668-E984-4541-871C-CF6194F3F71F -title {File Exists Condition} -component FileExistsCondition
- Condition 642021C6-FD45-486A-91AB-8A333627A3D9 -active Yes -parent C91C5668-E984-4541-871C-CF6194F3F71F -title {String Is Condition} -component StringIsCondition
- InstallComponent D0A37977-56A8-4296-9659-512D495FF25E -setup Install -conditions {C33F8E7D-7970-43C4-B653-FFA8CE170EC8 78C0D25B-104F-4227-ADF5-C342079844AD 0ACE12C8-A333-46A4-B24F-7C895219F2B0} -title {Quick Launch Shortcut Checkbutton} -component AddWidget -command insert -type action -active Yes -parent A4C5425B-25E9-4BB8-AC0A-3808CF2F27B3
- Condition C33F8E7D-7970-43C4-B653-FFA8CE170EC8 -active Yes -parent D0A37977-56A8-4296-9659-512D495FF25E -title {Platform Condition} -component PlatformCondition
- Condition 78C0D25B-104F-4227-ADF5-C342079844AD -active Yes -parent D0A37977-56A8-4296-9659-512D495FF25E -title {File Exists Condition} -component FileExistsCondition
- Condition 0ACE12C8-A333-46A4-B24F-7C895219F2B0 -active Yes -parent D0A37977-56A8-4296-9659-512D495FF25E -title {String Is Condition} -component StringIsCondition
- InstallType ::Silent
- InstallComponent 242E27AA-551C-4796-B099-DFCAF9498E62 -setup Install -title {Execute Action} -component ExecuteAction -type action -active Yes -parent Silent
- InstallComponent E4876404-6179-4839-B6F0-0CE2C46F3AC0 -setup Install -title Exit -component Exit -type action -active Yes -parent Silent
- InstallType ::ActionGroups
- InstallComponent 41678FFA-A713-40E4-8E81-E374344D2971 -setup Install -title {Startup Actions} -type actiongroup -active Yes -parent ActionGroups
- InstallComponent BA400D3F-D7F5-4B08-96DC-091A0416E08E -setup Install -title {Create Install Panes} -component CreateInstallPanes -type action -active Yes -parent 41678FFA-A713-40E4-8E81-E374344D2971
- InstallComponent 62EF759C-DEDA-4D58-AED0-90D0974F1657 -setup Install -title {Install Actions} -type actiongroup -active Yes -parent ActionGroups
- InstallComponent D9504B73-531B-4DAB-87F0-811824D98680 -setup Install -title {Install Selected Files} -component InstallSelectedFiles -type action -active Yes -parent 62EF759C-DEDA-4D58-AED0-90D0974F1657
- InstallComponent 4F8BE818-346C-4637-AE4C-4A6B7C48CB74 -setup Install -title {Install Uninstaller} -component InstallUninstaller -type action -active Yes -parent 62EF759C-DEDA-4D58-AED0-90D0974F1657
- InstallComponent 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70 -setup Install -conditions DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD -title {Windows Uninstall Registry} -component AddWindowsUninstallEntry -command insert -type action -active Yes -parent 62EF759C-DEDA-4D58-AED0-90D0974F1657
- Condition DCE54AB7-C9B6-4B3B-8FAC-C3D332B634CD -active Yes -parent 4B3A54D3-1471-47A2-8AD9-9098BB8E1B70 -title {Platform Condition} -component PlatformCondition
- InstallComponent A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3 -setup Install -conditions 9B3864C7-F41B-43F6-B5FB-86D60573F3EA -title {Program Shortcut} -component InstallWindowsShortcut -command insert -type action -active Yes -parent 62EF759C-DEDA-4D58-AED0-90D0974F1657
- Condition 9B3864C7-F41B-43F6-B5FB-86D60573F3EA -active Yes -parent A9D2ED78-502D-4FA8-A26A-C93DE0CAE4F3 -title {Platform Condition} -component PlatformCondition
- InstallComponent 4D90F974-8C14-4E2F-B458-82FE9510F546 -setup Install -conditions DC88586F-6788-4678-A90C-4D79A8DE9BE4 -title {Uninstall Shortcut} -component InstallWindowsShortcut -command insert -type action -active Yes -parent 62EF759C-DEDA-4D58-AED0-90D0974F1657
- Condition DC88586F-6788-4678-A90C-4D79A8DE9BE4 -active Yes -parent 4D90F974-8C14-4E2F-B458-82FE9510F546 -title {Platform Condition} -component PlatformCondition
- InstallComponent 5DD477BC-16FE-4DDC-9161-E30D7E1DB549 -setup Install -title {Finish Actions} -type actiongroup -active Yes -parent ActionGroups
- InstallComponent 75C4743C-92B4-41B2-9162-2929B3A08869 -setup Install -conditions {B8D63777-F7F8-4C24-901D-8024A7AB2F06 625FF735-46E7-411C-ABFE-D0BE7677001B} -title {Install Desktop Shortcut} -component InstallDesktopShortcut -command insert -type action -active Yes -parent 5DD477BC-16FE-4DDC-9161-E30D7E1DB549
- Condition B8D63777-F7F8-4C24-901D-8024A7AB2F06 -active Yes -parent 75C4743C-92B4-41B2-9162-2929B3A08869 -title {String Is Condition} -component StringIsCondition
- Condition 625FF735-46E7-411C-ABFE-D0BE7677001B -active Yes -parent 75C4743C-92B4-41B2-9162-2929B3A08869 -title {File Exists Condition} -component FileExistsCondition
- InstallComponent 1A5BA78D-0B6B-4051-B460-B94426C061F7 -setup Install -conditions {B8C49671-1167-476C-90AF-509528EAC2EE 3801681B-4E3B-4AA7-8787-A96E18DD14B6 211BD58E-6D44-49A5-AC4F-2DFA63C61083} -title {Install Quick Launch Shortcut} -component InstallWindowsShortcut -command insert -type action -active Yes -parent 5DD477BC-16FE-4DDC-9161-E30D7E1DB549
- Condition B8C49671-1167-476C-90AF-509528EAC2EE -active Yes -parent 1A5BA78D-0B6B-4051-B460-B94426C061F7 -title {String Is Condition} -component StringIsCondition
- Condition 3801681B-4E3B-4AA7-8787-A96E18DD14B6 -active Yes -parent 1A5BA78D-0B6B-4051-B460-B94426C061F7 -title {Platform Condition} -component PlatformCondition
- Condition 211BD58E-6D44-49A5-AC4F-2DFA63C61083 -active Yes -parent 1A5BA78D-0B6B-4051-B460-B94426C061F7 -title {File Exists Condition} -component FileExistsCondition
- InstallComponent 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8 -setup Install -conditions {BFF0AA9C-A6A8-490D-81E8-6BDF94581355 29E269AB-C3E3-4698-A8C4-0498DD1B541A F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F} -title {View Readme Window} -component TextWindow -command insert -type action -active Yes -parent 5DD477BC-16FE-4DDC-9161-E30D7E1DB549
- Condition BFF0AA9C-A6A8-490D-81E8-6BDF94581355 -active Yes -parent 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8 -title {String Is Condition} -component StringIsCondition
- Condition 29E269AB-C3E3-4698-A8C4-0498DD1B541A -active Yes -parent 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8 -title {String Is Condition} -component StringIsCondition
- Condition F56B3A55-F558-4D2C-ADFF-8B8B2C02E40F -active Yes -parent 789B80CD-AC41-4B69-9E7C-DF7C12C82AA8 -title {File Exists Condition} -component FileExistsCondition
- InstallComponent A5A6DE1F-6058-4D53-ACB1-C0E411A485AE -setup Install -conditions {9D77E823-EBFA-474A-9016-D327212A026B 8E64750C-6A5E-4955-9FA0-396CC703201B 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7} -title {Launch Application} -component ExecuteExternalProgram -command insert -type action -active Yes -parent 5DD477BC-16FE-4DDC-9161-E30D7E1DB549
- Condition 9D77E823-EBFA-474A-9016-D327212A026B -active Yes -parent A5A6DE1F-6058-4D53-ACB1-C0E411A485AE -title {String Is Condition} -component StringIsCondition
- Condition 8E64750C-6A5E-4955-9FA0-396CC703201B -active Yes -parent A5A6DE1F-6058-4D53-ACB1-C0E411A485AE -title {String Is Condition} -component StringIsCondition
- Condition 4F4A68D9-4A26-4E38-93FC-94F3EB6DCAE7 -active Yes -parent A5A6DE1F-6058-4D53-ACB1-C0E411A485AE -title {File Exists Condition} -component FileExistsCondition
- InstallComponent 1AF0EAD8-E770-4022-849F-D4C625BE1284 -setup Install -title {Cancel Actions} -type actiongroup -active Yes -parent ActionGroups
-
-
- proc main {} {
- ::InstallJammer::InstallMain
- }
-
- if {![info exists ::InstallJammer]} { main }
-
-